* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B35;
    --secondary-color: #4ECDC4;
    --success-color: #45B7D1;
    --warning-color: #FFA07A;
    --danger-color: #FF6B6B;
    --background-color: #F7F9FC;
    --text-color: #2C3E50;
    --light-text: #7F8C8D;
    --white: #FFFFFF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mascot {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
}

main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #e55a2b;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #3dbdb4;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

footer {
    background: var(--white);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
    color: var(--light-text);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light-text);
    transition: var(--transition);
}

.close:hover {
    color: var(--danger-color);
}

.help-content h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 0.75rem;
}

.help-content ul {
    list-style: none;
    padding-left: 0;
}

.help-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.help-content li:before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.restart-content {
    text-align: center;
}

.restart-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.restart-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.restart-content p {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.restart-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
    text-align: left;
}

.restart-content li {
    padding: 0.5rem 0;
    font-size: 1rem;
}

.restart-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

#restartBtn {
    background: linear-gradient(135deg, var(--secondary-color), var(--success-color));
    color: var(--white);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#restartBtn:hover {
    background: linear-gradient(135deg, var(--success-color), var(--secondary-color));
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 16px rgba(78, 205, 196, 0.4);
}

#restartBtn:active {
    transform: translateY(-1px) scale(0.98);
}

#restartBtn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

#restartBtn:active::after {
    width: 300px;
    height: 300px;
}

#restartBtn .icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

#restartBtn:hover .icon {
    transform: rotate(180deg);
}

#restartBtn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.5);
}

#confirmRestartBtn {
    background: var(--danger-color);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

#confirmRestartBtn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.4);
}

#confirmRestartBtn:active {
    transform: translateY(0);
}

#confirmRestartBtn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

#confirmRestartBtn:active::after {
    width: 300px;
    height: 300px;
}

#confirmRestartBtn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.5);
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.2rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .restart-actions {
        flex-direction: column;
    }
    
    .restart-actions .btn {
        width: 100%;
    }
}