/* ============================================
   FidgetSpinner.au - Modern CSS Styles
   ============================================ */

/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #f97316;
    --secondary-dark: #ea580c;
    --accent: #10b981;
    --background: #0f172a;
    --background-light: #1e293b;
    --surface: #334155;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #475569;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-2: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.btn-buy {
    background: var(--gradient-2);
    color: white;
    width: 100%;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.btn-buy-small {
    background: var(--gradient-2);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.btn-buy-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(15, 23, 42, 0.95);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-icon {
    font-size: 1.75rem;
    animation: spin 8s linear infinite;
}

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

.logo-text .au {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 24px;
}

.hero h1 {
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
}

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

/* Spinner Animation */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-animation {
    width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-3d {
    position: relative;
    width: 250px;
    height: 250px;
    animation: heroSpin 4s linear infinite;
}

@keyframes heroSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner-blade {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5);
}

.spinner-blade:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.spinner-blade:nth-child(2) {
    bottom: 20px;
    left: 10px;
}

.spinner-blade:nth-child(3) {
    bottom: 20px;
    right: 10px;
}

.spinner-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--background);
    border: 4px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 16px auto 0;
}

/* Products Section */
.products {
    background: var(--background-light);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
}

.product-badge.bestseller {
    background: var(--accent);
    color: white;
}

.product-badge.value {
    background: var(--secondary);
    color: white;
}

.product-badge.new {
    background: var(--primary);
    color: white;
}

.product-image {
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--surface) 0%, var(--background-light) 100%);
}

.spinner-icon {
    width: 120px;
    height: 120px;
    animation: productSpin 6s linear infinite;
}

.spinner-icon.premium { color: #c0c0c0; }
.spinner-icon.rainbow { color: #ff6b6b; }
.spinner-icon.brass { color: #d4a574; }
.spinner-icon.plastic { color: #4ecdc4; }
.spinner-icon.carbon { color: #2d3748; }
.spinner-icon.glow { color: #a8e6cf; }

@keyframes productSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner-svg {
    width: 100%;
    height: 100%;
}

.product-info {
    padding: 24px;
}

.product-info h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    color: #fbbf24;
}

.rating-count {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 16px;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.feature {
    padding: 4px 10px;
    background: var(--surface);
    border-radius: 50px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.product-price {
    margin-bottom: 16px;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

/* Quiz Section */
.quiz-section {
    background: var(--background);
    position: relative;
}

.quiz-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.quiz-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--background-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    position: relative;
}

.quiz-progress {
    margin-bottom: 40px;
}

.progress-bar {
    height: 8px;
    background: var(--surface);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 50px;
    width: 25%;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    display: block;
}

.quiz-question {
    display: none;
    animation: fadeIn 0.5s ease;
}

.quiz-question.active {
    display: block;
}

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

.quiz-question h3 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 1.5rem;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.quiz-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.quiz-option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
}

.option-icon {
    font-size: 2.5rem;
}

.option-text {
    font-weight: 600;
    color: var(--text);
}

.quiz-result {
    display: none;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.quiz-result.active {
    display: block;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 24px;
}

.quiz-result h3 {
    margin-bottom: 24px;
    font-size: 2rem;
}

.result-product {
    background: var(--background);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.result-product h4 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--primary-light);
}

.result-product p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Comparison Section */
.compare-section {
    background: var(--background-light);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.comparison-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    background: var(--background);
}

.comparison-table th,
.comparison-table td {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    background: var(--surface);
    font-weight: 600;
}

.th-product {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.th-price {
    display: block;
    font-size: 0.875rem;
    color: var(--secondary);
    font-weight: 700;
}

.feature-name {
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
}

.comparison-table td:not(.feature-name) {
    font-size: 0.9375rem;
}

.highlight {
    color: var(--accent);
    font-weight: 600;
}

.rating-dots {
    display: inline-flex;
    gap: 4px;
    margin-right: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
}

.dot.filled {
    background: var(--accent);
    border-color: var(--accent);
}

.action-row td {
    padding: 24px 20px;
    background: var(--surface);
    border-bottom: none;
}

/* SEO Section */
.seo-section {
    background: var(--background);
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
}

.seo-content h2 {
    text-align: center;
    margin-bottom: 48px;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.seo-block {
    background: var(--background-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.seo-block h3 {
    margin-bottom: 16px;
    color: var(--primary-light);
}

.seo-block p {
    color: var(--text-muted);
    line-height: 1.8;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--background-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.badge-icon {
    font-size: 1.5rem;
}

.badge-text {
    font-weight: 600;
    color: var(--text);
}

/* Footer */
.footer {
    background: var(--background-light);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 16px;
    max-width: 280px;
}

.footer-links h4 {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--text);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.copyright {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.affiliate-disclosure {
    color: var(--text-muted);
    font-size: 0.8125rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.7;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .spinner-animation {
        width: 280px;
        height: 280px;
    }

    .spinner-3d {
        width: 200px;
        height: 200px;
    }

    .spinner-blade {
        width: 60px;
        height: 60px;
    }

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

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

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        border-bottom: 1px solid var(--border);
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    section {
        padding: 60px 0;
    }

    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

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

    .quiz-options {
        grid-template-columns: 1fr;
    }

    .quiz-container {
        padding: 24px;
    }

    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        white-space: nowrap;
    }

    .trust-badges {
        flex-direction: column;
        align-items: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-brand p {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-badge {
        font-size: 0.75rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .product-card {
        margin: 0 -10px;
        border-radius: var(--radius-md);
    }

    .comparison-table th,
    .comparison-table td {
        padding: 12px 8px;
        font-size: 0.8125rem;
    }

    .th-product {
        font-size: 0.875rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9375rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
a:focus,
button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}
