/* ==================== CSS RESET & VARIABLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Glass Morphism Theme */
    --primary-color: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary-color: #ec4899;
    --accent-color: #f472b6;
    --success-color: #10b981;
    --warning-color: #f59e0b;

    --bg-primary: rgba(255, 255, 255, 0.7);
    --bg-secondary: rgba(248, 250, 252, 0.6);
    --bg-tertiary: rgba(241, 245, 249, 0.5);

    --text-primary: #374151;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;

    --border-color: rgba(139, 92, 246, 0.2);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== BASE STYLES ==================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f9fafb 0%, #faf5ff 50%, #fef3f9 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================== GLASS MORPHISM UTILITY ==================== */
.glass {
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

/* ==================== LAYOUT CONTAINERS ==================== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* ==================== HEADER ==================== */
.header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out;
}

.header h1 {
    background: linear-gradient(to right, #a78bfa, #f472b6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.header p {
    color: var(--text-primary);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 500;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.8s ease-out;
}

/* ==================== CONTROL PANEL ==================== */
.control-panel {
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-xl);
    animation: slideInLeft 0.6s ease-out;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    appearance: none;
}

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

.select-wrapper select:hover {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ==================== BUTTONS ==================== */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    opacity: 0.9;
}

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

.btn-secondary {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
}

/* ==================== STATS PANEL ==================== */
.stats-panel {
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-xl);
    animation: slideInRight 0.6s ease-out;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.stat-value.paused {
    color: var(--warning-color);
}

/* ==================== GAME AREA ==================== */
.game-container {
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
}

.game-container.paused::after {
    content: 'PAUSED';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(4px);
    z-index: 10;
}

.puzzle-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.puzzle-board {
    display: grid;
    gap: 4px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.puzzle-piece {
    /* background-size and background-position are set via inline styles per piece */
    background-repeat: no-repeat;
    border-radius: var(--radius-sm);
    cursor: grab;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.puzzle-piece::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    pointer-events: none;
}

.puzzle-piece:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.puzzle-piece:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    z-index: 15;
}

.puzzle-piece.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.puzzle-piece.correct {
    cursor: default;
    animation: correctPlacement 0.5s ease-out;
}

.puzzle-piece.correct::after {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.puzzle-piece.selected {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
    z-index: 20;
}

/* ==================== WELCOME SCREEN ==================== */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    padding: 40px;
}

.welcome-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.welcome-screen h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.welcome-screen p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 500px;
}

/* ==================== PREVIEW IMAGE ==================== */
.preview-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    transition: all var(--transition-base);
}

.preview-container.hidden {
    display: none;
}

.preview-image {
    width: 150px;
    height: 150px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 3px solid var(--bg-primary);
    object-fit: cover;
}

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal {
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease-out;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out;
}

.modal h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.modal p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-stats {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 24px 0;
}

.modal-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.modal-stat-item:last-child {
    border-bottom: none;
}

.modal-stat-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.modal-stat-value {
    color: var(--primary-color);
    font-weight: 700;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== HIGH SCORES ==================== */
.high-scores-section {
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-xl);
    margin-top: 20px;
    animation: fadeInUp 1s ease-out;
}

.high-scores-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.high-scores-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.difficulty-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.filter-btn:hover {
    border-color: var(--primary-color);
}

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

.scores-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.score-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    transition: all var(--transition-base);
}

.score-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.score-item.new-score {
    animation: highlightScore 1s ease-out;
    border-color: var(--success-color);
}

.score-rank {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    min-width: 40px;
    text-align: center;
}

.score-difficulty {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.score-moves {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.score-time {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.no-scores {
    text-align: center;
    padding: 40px;
    color: var(--text-tertiary);
    font-size: 1rem;
}

/* ==================== TUTORIAL OVERLAY ==================== */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.tutorial-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 600px;
}

.tutorial-content h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 2rem;
}

.tutorial-step {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.tutorial-step h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.tutorial-step p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== CONFETTI ANIMATION ==================== */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    position: absolute;
    animation: confettiFall 3s linear;
    z-index: 9999;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

@keyframes correctPlacement {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); }
    100% { transform: scale(1); }
}

@keyframes highlightScore {
    0%, 100% { background: var(--bg-secondary); }
    50% { background: rgba(16, 185, 129, 0.2); }
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes neonGlowPulse {
    0%, 100% {
        box-shadow:
            0 0 10px rgba(0, 255, 255, 0.6),
            0 0 20px rgba(0, 255, 255, 0.5),
            0 0 30px rgba(0, 255, 255, 0.4),
            0 0 40px rgba(0, 255, 255, 0.3),
            inset 0 0 15px rgba(0, 255, 255, 0.2);
        filter: brightness(1.1) saturate(1.2);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 15px rgba(255, 0, 255, 0.8),
            0 0 30px rgba(255, 0, 255, 0.6),
            0 0 45px rgba(255, 0, 255, 0.5),
            0 0 60px rgba(255, 0, 255, 0.4),
            inset 0 0 20px rgba(255, 0, 255, 0.3);
        filter: brightness(1.25) saturate(1.5);
        transform: scale(1.02);
    }
}

.btn-primary.pulse-highlight {
    animation: neonGlowPulse 1.2s ease-in-out infinite;
    position: relative;
    z-index: 10;
}

/* ==================== PRIVACY FEATURES SECTION ==================== */
.privacy-features-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(236, 72, 153, 0.08));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    margin-top: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    animation: fadeInUp 1.2s ease-out;
}

.privacy-header {
    text-align: center;
    margin-bottom: 40px;
}

.privacy-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 800;
}

.privacy-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-top: 32px;
}

@media (max-width: 1400px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

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

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card-highlight {
    /* Removed special background - now matches other cards */
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: inline-block;
    transition: transform var(--transition-base);
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
}

.feature-title {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.feature-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ==================== FOOTER SECTION ==================== */
.footer-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(236, 72, 153, 0.08));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 48px 32px 32px;
    margin-top: 60px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 1.4s ease-out;
}

.enterprise-badge {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 24px;
    text-align: center;
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
}

.footer-brand {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 2px solid var(--border-color);
}

.footer-brand h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.footer-brand h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-base);
}

.footer-brand h3 a:hover {
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    color: var(--primary-color);
    transform: scale(1.02);
    display: inline-block;
}

.footer-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.footer-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-column h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li {
    transition: all var(--transition-base);
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-base);
    padding: 4px 0;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.footer-links .emoji {
    font-size: 1rem;
    display: inline-block;
    transition: transform var(--transition-base);
}

.footer-links a:hover .emoji {
    transform: scale(1.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 2px solid var(--border-color);
}

.footer-copyright {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.footer-tagline-bottom {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .app-container { padding: 12px; }
    .header h1 { font-size: 2rem; }
    .control-panel, .stats-panel, .game-container { padding: 16px; }
    .control-grid { grid-template-columns: 1fr; gap: 16px; }
    .button-group { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-value { font-size: 1.5rem; }
    .puzzle-board { padding: 8px; gap: 2px; }
    .modal { padding: 24px; }
    .score-item { grid-template-columns: auto 1fr; gap: 12px; }
    .score-moves, .score-time { grid-column: 2; }
    .preview-container { bottom: 10px; right: 10px; }
    .preview-image { width: 100px; height: 100px; }
    .privacy-features-section { padding: 32px 20px; }
    .privacy-header h2 { font-size: 1.75rem; }
    .privacy-subtitle { font-size: 1rem; }
    .features-grid { grid-template-columns: 1fr; gap: 20px; }
    .feature-card { padding: 24px 20px; }
    .feature-icon { font-size: 2.5rem; }
    .feature-title { font-size: 1.125rem; }
    .footer-section { padding: 32px 20px 24px; margin-top: 40px; }
    .footer-brand h3 { font-size: 1.5rem; }
    .footer-tagline { font-size: 0.9375rem; }
    .footer-note { font-size: 0.8125rem; }
    .footer-content { grid-template-columns: 1fr; gap: 32px; }
    .footer-column h4 { font-size: 1rem; margin-bottom: 16px; }
    .footer-links { gap: 10px; }
    .footer-links a { font-size: 0.875rem; }
    .enterprise-badge { font-size: 0.875rem; padding: 10px 20px; }
}

@media (max-width: 480px) {
    .header h1 { font-size: 1.75rem; }
    .header p { font-size: 0.875rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .welcome-icon, .modal-icon { font-size: 60px; }
    .modal-buttons { flex-direction: column; }
    .modal-buttons .btn { width: 100%; }
    .game-container.paused::after { font-size: 2rem; }
    .privacy-features-section { padding: 24px 16px; margin-top: 24px; }
    .privacy-header h2 { font-size: 1.5rem; }
    .privacy-subtitle { font-size: 0.9375rem; }
    .feature-card { padding: 20px 16px; }
    .feature-icon { font-size: 2.25rem; }
    .feature-title { font-size: 1.0625rem; }
    .feature-description { font-size: 0.9375rem; }
    .footer-section { padding: 24px 16px 20px; margin-top: 24px; }
    .footer-brand h3 { font-size: 1.375rem; }
    .footer-tagline { font-size: 0.875rem; }
    .footer-note { font-size: 0.75rem; }
    .footer-brand { margin-bottom: 32px; padding-bottom: 24px; }
    .footer-content { gap: 24px; margin-bottom: 32px; }
    .footer-column h4 { font-size: 0.9375rem; }
    .footer-links a { font-size: 0.8125rem; }
    .footer-copyright { font-size: 0.875rem; }
    .footer-tagline-bottom { font-size: 0.8125rem; }
    .enterprise-badge { font-size: 0.8125rem; padding: 8px 16px; margin-bottom: 24px; }
}

/* ==================== UTILITY CLASSES ==================== */
.hidden { display: none !important; }
.text-center { text-align: center; }
