/* ============================================
   Spinfred Gaming - Terms & Conditions Page Stylesheet
   Mobile-First, Performance-Optimized
   Legal Document Style - Clean & Professional
   ============================================ */

/* CSS Variables for consistency */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #ffd700;
    --bg-dark: #0f0f1e;
    --bg-medium: #1a1a2e;
    --bg-light: #16213e;
    --bg-card: #1e2a47;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --accent-color: #ee5a6f;
    --transition: all 0.3s ease;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.4);
    --border-radius: 12px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: var(--text-primary);
    padding: var(--spacing-xs) var(--spacing-sm);
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Header Styles - Matching Homepage */
header {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.header-spacer {
    flex: 1;
    min-width: 44px;
}

.logo {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.logo-centered {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.6)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 8px;
}

@media (min-width: 480px) {
    .logo-image {
        height: 45px;
    }
}

@media (min-width: 768px) {
    .logo-image {
        height: 50px;
    }
}

.logo:hover,
.logo:focus {
    color: var(--primary-color);
    transform: translateX(-50%) scale(1.05);
}

.logo:hover .logo-image,
.logo:focus .logo-image {
    transform: scale(1.1);
    filter: brightness(1.3) drop-shadow(0 4px 12px rgba(255, 215, 0, 0.8));
}

/* Hamburger Menu */
.hamburger-menu-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: 4px;
    transition: var(--transition);
    min-width: 44px;
    min-height: 44px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-menu-btn:hover,
.hamburger-menu-btn:focus {
    background: rgba(255, 215, 0, 0.1);
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    color: var(--secondary-color);
}

.hamburger-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--bg-medium) 0%, var(--bg-light) 100%);
    list-style: none;
    padding: var(--spacing-lg) var(--spacing-md);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    border-right: 3px solid var(--secondary-color);
    transition: left 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.hamburger-menu.active {
    left: 0;
}

.hamburger-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}

.hamburger-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.hamburger-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.hamburger-menu-title {
    color: var(--secondary-color);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.hamburger-close-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: 4px;
    transition: var(--transition);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.hamburger-close-btn:hover,
.hamburger-close-btn:focus {
    background: rgba(255, 215, 0, 0.1);
    color: var(--secondary-color);
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.hamburger-menu a {
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    padding: var(--spacing-md);
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    border-right: 3px solid transparent;
}

.hamburger-menu a:hover,
.hamburger-menu a:focus {
    background: rgba(255, 215, 0, 0.1);
    color: var(--secondary-color);
    border-right-color: var(--secondary-color);
    transform: translateX(-5px);
}

.hamburger-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--text-primary) !important;
    font-weight: 600;
    text-align: center;
    margin-top: var(--spacing-sm);
    border: none !important;
    padding: var(--spacing-md) !important;
    border-radius: 8px !important;
    box-shadow: var(--shadow);
}

.hamburger-btn-primary:hover,
.hamburger-btn-primary:focus {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hamburger-btn-secondary {
    background: transparent;
    border: 2px solid var(--secondary-color) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
    text-align: center;
    margin-top: var(--spacing-sm);
    padding: var(--spacing-md) !important;
    border-radius: 8px !important;
}

.hamburger-btn-secondary:hover,
.hamburger-btn-secondary:focus {
    background: var(--secondary-color);
    color: var(--bg-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-medium) 0%, var(--bg-light) 50%, #0f3460 100%);
    padding: var(--spacing-lg) var(--spacing-sm);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h1 {
    margin-bottom: var(--spacing-sm);
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto var(--spacing-sm);
    line-height: 1.8;
}

.hero-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Table of Contents */
.toc-section {
    padding: var(--spacing-md) 0;
    background: var(--bg-medium);
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
}

.toc-card {
    background: var(--bg-card);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.toc-title {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.toc-nav {
    margin-top: var(--spacing-md);
}

.toc-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xs);
}

.toc-list li {
    margin-bottom: var(--spacing-xs);
}

.toc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    display: block;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.toc-list a:hover,
.toc-list a:focus {
    color: var(--secondary-color);
    background: rgba(255, 215, 0, 0.1);
    border-left-color: var(--secondary-color);
    transform: translateX(5px);
}

.toc-list a.active {
    color: var(--secondary-color);
    background: rgba(255, 215, 0, 0.15);
    border-left-color: var(--secondary-color);
    font-weight: 600;
}

/* Terms Content Section */
.terms-content-section {
    padding: var(--spacing-lg) 0;
    background: var(--bg-dark);
}

.terms-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Term Section */
.term-section {
    background: var(--bg-card);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--secondary-color);
    display: flex;
    gap: var(--spacing-md);
    transition: var(--transition);
}

.term-section:hover {
    box-shadow: var(--shadow-hover);
    transform: translateX(5px);
}

.term-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-color), #ffed4e);
    color: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.term-content {
    flex: 1;
}

.term-content h2 {
    color: var(--secondary-color);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.term-content p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.8;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

.term-content p:last-child {
    margin-bottom: 0;
}

.term-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Term List */
.term-list {
    list-style: none;
    padding-left: 0;
    margin: var(--spacing-md) 0;
}

.term-list li {
    position: relative;
    padding-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

.term-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.term-list.warning li::before {
    content: '⚠';
    color: #ffa500;
}

/* Internal Link */
.internal-link {
    color: var(--secondary-color);
    text-decoration: underline;
    transition: var(--transition);
}

.internal-link:hover,
.internal-link:focus {
    color: var(--primary-color);
}

/* Terms End */
.terms-end {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: var(--spacing-lg);
    text-align: center;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.end-marker {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 2px;
}

.last-updated {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Footer */
footer {
    background: var(--bg-dark);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-section h3,
.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    color: var(--text-secondary);
    transition: var(--transition);
    display: inline-block;
    padding: 0.25rem 0;
    text-decoration: none;
}

.footer-section a:hover,
.footer-section a:focus {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.social-link {
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: var(--transition);
    text-decoration: none;
}

.social-link:hover,
.social-link:focus {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    background: rgba(255, 215, 0, 0.1);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.disclaimer {
    margin-top: var(--spacing-xs);
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Accessibility */
*:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Body Scroll Lock */
body.no-scroll {
    overflow: hidden;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .term-section {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .term-number {
        align-self: flex-start;
    }
    
    .toc-list {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    .hamburger-menu-btn,
    .toc-section {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .term-section {
        page-break-inside: avoid;
    }
}

