:root {
    --primary-color: #5A1414;
    --secondary-color: #FFB612;
    --accent-color: #FFB612;
    --text-light: #ffffff;
    --text-dark: #000000;
    --bg-gradient-start: #000000;
    --bg-gradient-end: #5A1414;
    --card-bg: rgba(90, 20, 20, 0.2);
    --card-border: rgba(255, 182, 18, 0.3);
    --shadow-color: rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--primary-color);
    background-image: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.01) 10px,
            rgba(255, 255, 255, 0.01) 20px
        );
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 800px;
    z-index: 1;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideDown 0.8s ease-out;
}

.logo {
    width: clamp(252px, 45vw, 450px);
    height: auto;
    margin-bottom: 0;
    filter: drop-shadow(0 0 20px rgba(255, 182, 18, 0.3));
    animation: fadeIn 0.6s ease-out;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 182, 18, 0.5);
    margin-bottom: 10px;
}

.tagline {
    font-size: clamp(1rem, 3vw, 1.3rem);
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.9;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.roast-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--card-border);
    border-radius: 20px;
    padding: clamp(30px, 5vw, 50px);
    width: 100%;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 20px 40px var(--shadow-color),
        inset 0 0 30px rgba(255, 182, 18, 0.05);
    position: relative;
    overflow: hidden;
    animation: fadeIn 1s ease-out;
}

.roast-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 182, 18, 0.03),
        rgba(255, 182, 18, 0.08),
        rgba(255, 182, 18, 0.12),
        rgba(255, 182, 18, 0.08),
        rgba(255, 182, 18, 0.03),
        transparent
    );
    animation: shimmer 5s infinite;
}

.roast-text {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    line-height: 1.6;
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
    position: relative;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.roast-text.fade-out {
    opacity: 0;
}

.roast-text.fade-in {
    animation: fadeInText 0.5s ease-out;
}

.roast-button {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--text-dark);
    border: none;
    border-radius: 50px;
    padding: 18px 40px;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 182, 18, 0.3);
    position: relative;
    overflow: hidden;
}

.roast-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.roast-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 182, 18, 0.4);
}

.roast-button:hover::before {
    width: 300px;
    height: 300px;
}

.roast-button:active {
    transform: translateY(-1px);
}

.roast-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

footer {
    margin-top: 50px;
    text-align: center;
    animation: fadeIn 1.2s ease-out;
}

.footer-text {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: var(--accent-color);
    opacity: 0.7;
    font-style: italic;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 600px) and (orientation: portrait) {
    body {
        padding: 10px;
        height: 100vh;
        overflow: hidden;
    }
    
    .container {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    header {
        margin-bottom: 20px;
    }
    
    main {
        gap: 20px;
    }
    
    .roast-card {
        min-height: 180px;
        padding: 20px;
    }
    
    .roast-button {
        padding: 15px 30px;
        width: 100%;
        max-width: 300px;
    }
    
    footer {
        margin-top: 20px;
    }
}

@media (max-width: 600px) and (orientation: landscape) {
    body {
        padding: 15px;
    }
    
    header {
        margin-bottom: 30px;
    }
    
    .roast-card {
        min-height: 200px;
        padding: 25px;
    }
    
    .roast-button {
        padding: 15px 30px;
        width: 100%;
        max-width: 300px;
    }
    
    footer {
        margin-top: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    .roast-card::before {
        display: none;
    }
}