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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a237e 50%, #0d47a1 100%);
    color: #e0e0ff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(124, 77, 255, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(33, 150, 243, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 50% 50%, rgba(255, 64, 129, 0.1) 0%, transparent 35%);
    z-index: -1;
    animation: pulse 10s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.container {
    width: 100%;
    max-width: 1400px;
    background: rgba(18, 22, 59, 0.6);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 
        0 0 30px rgba(124, 77, 255, 0.3),
        inset 0 0 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(124, 77, 255, 0.4);
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        #7c4dff, 
        #2196f3, 
        #7c4dff, 
        transparent);
    box-shadow: 0 0 10px #7c4dff;
    border-radius: 20px 20px 0 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(18, 22, 59, 0.7);
    border-radius: 15px;
    border: 1px solid rgba(124, 77, 255, 0.3);
    box-shadow: 0 0 20px rgba(124, 77, 255, 0.2);
    margin-bottom: 25px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo:active {
    transform: scale(0.98);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #7c4dff, #2196f3);
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 3px;
    padding: 6px;
    box-shadow: 0 0 15px rgba(124, 77, 255, 0.5);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 15px rgba(124, 77, 255, 0.5); }
    50% { box-shadow: 0 0 25px rgba(124, 77, 255, 0.8), 0 0 35px rgba(124, 77, 255, 0.5); }
}

.logo-icon div {
    background: white;
    border-radius: 2px;
    opacity: 0.8;
}

.logo-text h1 {
    font-size: 28px;
    background: linear-gradient(to right, #7c4dff, #2196f3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(124, 77, 255, 0.5);
    margin-bottom: 2px;
}

.logo-text p {
    font-size: 14px;
    color: #e0e0ff;
    opacity: 0.8;
}

.sudoku-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    gap: 2px;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1/1;
    background: rgba(124, 77, 255, 0.2);
    border: 3px solid #7c4dff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(124, 77, 255, 0.4),
        inset 0 0 50px rgba(0, 0, 0, 0.3);
    position: relative;
}

.sudoku-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 40%, 
        rgba(124, 77, 255, 0.1) 50%, 
        transparent 60%);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

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

.cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    background: rgba(30, 35, 80, 0.8);
    border: 1px solid rgba(124, 77, 255, 0.2);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.cell:hover {
    background: rgba(124, 77, 255, 0.2);
}

.cell.selected {
    background: rgba(124, 77, 255, 0.4);
    box-shadow: inset 0 0 10px rgba(124, 77, 255, 0.5);
}

.cell.fixed {
    color: #7c4dff;
}

.cell.user-input {
    color: #e0e0ff;
}

.cell.error {
    color: #ff4081;
    background: rgba(255, 64, 129, 0.2);
}

.cell:nth-child(3n) {
    border-right: 2px solid #7c4dff;
}

.cell:nth-child(9n) {
    border-right: none;
}

.cell:nth-child(n+19):nth-child(-n+27),
.cell:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid #7c4dff;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #7c4dff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

footer {
    text-align: center;
}

.motivation-message {
    font-size: 14px;
    color: #2196f3;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

@media (max-width: 1200px) {
    .container {
        padding: 20px;
    }
    
    .sudoku-board {
        max-width: 500px;
    }
    
    header {
        padding: 12px 15px;
    }
}

@media (max-width: 992px) {
    .container {
        padding: 15px;
    }
    
    header {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .logo-text h1 {
        font-size: 22px;
    }
    
    .logo-text p {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }
    
    .container {
        padding: 15px;
        border-radius: 15px;
    }
    
    header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 6px 8px;
        gap: 6px;
        margin-bottom: 18px;
    }
    
    .logo {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .logo-text h1 {
        font-size: 18px;
        margin: 0;
    }
    
    .logo-text p {
        font-size: 10px;
        margin: 0;
        opacity: 0.7;
    }
    
    .sudoku-board {
        max-width: 100%;
        width: 100%;
        aspect-ratio: 1/1;
    }
    
    .cell {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 18px;
    }
}
