/* Am I A Chess Noob? - Styles */

:root {
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252545;
    --primary: #ff6b35;
    --primary-dark: #e85a24;
    --secondary: #f72585;
    --accent: #7209b7;
    --success: #4cc9f0;
    --warning: #ffd60a;
    --text: #ffffff;
    --text-muted: #a0a0b0;
    --gradient-fire: linear-gradient(135deg, #ff6b35 0%, #f72585 50%, #7209b7 100%);
    --gradient-card: linear-gradient(145deg, #1a1a2e 0%, #16162a 100%);
    --shadow-glow: 0 0 40px rgba(255, 107, 53, 0.3);
    --border-radius: 16px;
    --border-radius-sm: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-piece {
    position: absolute;
    font-size: 4rem;
    opacity: 0.08;
    animation: float 20s ease-in-out infinite;
}

.piece-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.piece-2 {
    top: 20%;
    right: 10%;
    animation-delay: -3s;
}

.piece-3 {
    top: 50%;
    left: 8%;
    animation-delay: -6s;
}

.piece-4 {
    top: 70%;
    right: 5%;
    animation-delay: -9s;
}

.piece-5 {
    bottom: 15%;
    left: 15%;
    animation-delay: -12s;
}

.piece-6 {
    bottom: 25%;
    right: 15%;
    animation-delay: -15s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(5deg);
    }

    50% {
        transform: translateY(-10px) rotate(-3deg);
    }

    75% {
        transform: translateY(-30px) rotate(3deg);
    }
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

.results-container {
    max-width: 800px;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.title {
    font-family: 'Bangers', cursive;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

.title-am {
    color: var(--text);
    display: block;
    font-size: 2rem;
}

.title-chess {
    color: var(--success);
    display: block;
}

.title-noob {
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    font-size: 5rem;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Form */
.roast-form {
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-glow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.8rem;
}

select,
input[type="text"] {
    width: 100%;
    padding: 1rem;
    background: var(--bg-dark);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    appearance: none;
}

select:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

input::placeholder {
    color: var(--text-muted);
}

/* Intensity Slider */
.intensity-slider {
    padding-top: 0.5rem;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--gradient-fire);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.5);
}

.intensity-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.intensity-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.3s, transform 0.3s;
}

.intensity-label.active {
    color: var(--primary);
    transform: scale(1.1);
}

/* Roast Button */
.roast-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    background: var(--gradient-fire);
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--text);
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.roast-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

.roast-btn:active:not(:disabled) {
    transform: translateY(0);
}

.roast-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.roast-btn .btn-loading {
    display: none;
}

.roast-btn.loading .btn-text {
    display: none;
}

.roast-btn.loading .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Message */
.error-message {
    background: rgba(247, 37, 133, 0.2);
    border: 1px solid var(--secondary);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-top: 1rem;
    color: var(--secondary);
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Disclaimer */
.disclaimer {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
}

.disclaimer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.grok-badge {
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Results Page Styles */
.results-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary);
}

.results-title {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Verdict Section */
.verdict-section {
    text-align: center;
    margin-bottom: 2rem;
}

.verdict-badge {
    background: var(--gradient-card);
    border: 2px solid var(--primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-glow);
}

.verdict-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.verdict-text {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.username-display {
    margin-top: 1rem;
    color: var(--text-muted);
}

/* Roast Section */
.roast-section {
    margin-bottom: 2rem;
}

.roast-card {
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.roast-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.roast-text {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    color: var(--text);
}

/* Embarrassing Stats */
.embarrassing-section {
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.games-note {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 107, 53, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.embarrassing-list {
    list-style: none;
    background: var(--gradient-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.embarrassing-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.embarrassing-list li:last-child {
    border-bottom: none;
}

.embarrassing-list li::before {
    content: '💀 ';
}

/* Stats Section */
.stats-section {
    margin-bottom: 2rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chart-card {
    background: var(--gradient-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.chart-card h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-align: center;
}

.chart-card canvas {
    max-height: 200px;
}

.chart-wide {
    grid-column: 1 / -1;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-item {
    background: var(--gradient-card);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Share Section */
.share-section {
    margin-bottom: 2rem;
}

.share-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 2px solid var(--primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1rem;
}

.share-card-content {
    text-align: center;
}

.share-card-header {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.share-card-verdict {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.share-card-username {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.share-card-stats {
    list-style: none;
    text-align: left;
    max-width: 300px;
    margin: 0 auto 1rem;
}

.share-card-stats li {
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: var(--text);
}

.share-card-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.share-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.share-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.download-btn {
    background: var(--success);
    color: var(--bg-dark);
}

.twitter-btn {
    background: #000;
    color: white;
}

.reddit-btn {
    background: #ff4500;
    color: white;
}

.discord-btn {
    background: #5865f2;
    color: white;
}

/* Try Again */
.try-again-section {
    text-align: center;
    margin-bottom: 2rem;
}

.try-again-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--gradient-fire);
    border-radius: var(--border-radius-sm);
    color: white;
    text-decoration: none;
    font-family: 'Bangers', cursive;
    font-size: 1.25rem;
    letter-spacing: 1px;
    transition: transform 0.2s;
}

.try-again-btn:hover {
    transform: translateY(-2px);
}

/* Affiliate Section */
.affiliate-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
}

.affiliate-title {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.affiliate-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.affiliate-link {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    transition: border-color 0.3s;
}

.affiliate-link:hover {
    border-color: var(--primary);
}

.affiliate-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 2rem 1rem;
    }

    .roast-form {
        padding: 1.5rem;
    }

    .title {
        font-size: 2.5rem;
    }

    .title-noob {
        font-size: 3.5rem;
        text-shadow: none;
        filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.3));
    }

    .intensity-label {
        font-size: 0.7rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .share-actions {
        grid-template-columns: 1fr;
    }
}