* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.hidden {
    display: none !important;
}

/* Lock Screen Styles */
.lock-container {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.lock-title {
    font-size: 2.5em;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.code-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.digit-box {
    width: 70px;
    height: 70px;
    border: 3px solid #4a90e2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    background: rgba(74, 144, 226, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.3);
}

.digit-box.filled {
    background: rgba(74, 144, 226, 0.3);
    border-color: #6bb3ff;
    box-shadow: 0 0 25px rgba(74, 144, 226, 0.5);
    transform: scale(1.1);
    animation: pulse 0.5s ease;
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 300px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.num-btn {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    font-size: 2em;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
    position: relative;
    overflow: hidden;
}

.num-btn::before {
    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, height 0.6s;
}

.num-btn:active::before {
    width: 300px;
    height: 300px;
}

.num-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.6);
    background: linear-gradient(135deg, #5ba0f2 0%, #4588cd 100%);
}

.num-btn:active {
    transform: translateY(-2px) scale(0.95);
}

.clear-btn {
    background: linear-gradient(135deg, #e24a4a 0%, #bd3535 100%);
    box-shadow: 0 5px 15px rgba(226, 74, 74, 0.4);
}

.clear-btn:hover {
    background: linear-gradient(135deg, #f25a5a 0%, #cd4545 100%);
    box-shadow: 0 8px 25px rgba(226, 74, 74, 0.6);
}

.delete-btn {
    background: linear-gradient(135deg, #e2a44a 0%, #bd8535 100%);
    box-shadow: 0 5px 15px rgba(226, 164, 74, 0.4);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #f2b45a 0%, #cd9545 100%);
    box-shadow: 0 8px 25px rgba(226, 164, 74, 0.6);
}

.error-message {
    margin-top: 20px;
    color: #ff6b6b;
    font-size: 1.2em;
    min-height: 30px;
    animation: shake 0.5s ease;
}

/* Comic List Screen */
.comic-list-container {
    max-width: 1200px;
    width: 100%;
    padding: 40px 20px;
}

.comic-list-title {
    font-size: 3em;
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 1s ease-out;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-items: center;
}

.comic-card {
    background: rgba(74, 144, 226, 0.15);
    border: 3px solid #4a90e2;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    max-width: 350px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out both;
    box-shadow: 0 5px 20px rgba(74, 144, 226, 0.3);
}

.comic-card:nth-child(1) {
    animation-delay: 0.2s;
}

.comic-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.5);
    border-color: #6bb3ff;
    background: rgba(74, 144, 226, 0.25);
}

.comic-image-placeholder {
    width: 200px;
    height: 250px;
    background: rgba(74, 144, 226, 0.2);
    border: 2px dashed #4a90e2;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5em;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.comic-card-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 15px;
    margin: 0 auto 20px;
    display: block;
    border: 2px solid rgba(74, 144, 226, 0.5);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.comic-card:hover .comic-image-placeholder {
    background: rgba(74, 144, 226, 0.3);
    border-color: #6bb3ff;
}

.comic-card:hover .comic-card-image {
    transform: scale(1.05);
    border-color: #6bb3ff;
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.5);
}

.comic-card h2 {
    font-size: 1.8em;
    margin-top: 15px;
}

/* Comic Reader Screen */
.comic-reader-screen {
    padding: 100px 20px 50px;
}

.comic-reader-container {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.comic-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    scroll-snap-align: start;
}

.comic-content {
    max-width: 800px;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.comic-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.comic-text {
    font-size: 1.8em;
    line-height: 1.8;
    text-align: center;
    padding: 40px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 20px;
    border: 2px solid rgba(74, 144, 226, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.comic-title-page {
    font-size: 4em;
    text-align: center;
    padding: 60px 40px;
    background: rgba(74, 144, 226, 0.15);
    border-radius: 30px;
    border: 4px solid #4a90e2;
    box-shadow: 0 10px 40px rgba(74, 144, 226, 0.4);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.comic-poster {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    border: 3px solid #4a90e2;
}

.comic-panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
    justify-items: center;
}

.comic-panel-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(74, 144, 226, 0.5);
    transition: all 0.3s ease;
    background: rgba(74, 144, 226, 0.1);
}

.comic-panel-image:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(74, 144, 226, 0.6);
    border-color: #6bb3ff;
}

.comic-panel-section {
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.comic-panel-image-single {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(74, 144, 226, 0.5);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.comic-panel-image-single:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(74, 144, 226, 0.6);
    border-color: #6bb3ff;
}

.comic-page-title {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 30px;
    color: #6bb3ff;
    text-shadow: 0 0 15px rgba(107, 179, 255, 0.5);
}

.comic-panel-text {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(74, 144, 226, 0.08);
    border-radius: 15px;
    border-left: 4px solid #4a90e2;
}

.comic-dialogue {
    font-size: 1.4em;
    line-height: 1.6;
    margin: 10px 0;
    color: #ffffff;
}

.comic-narration {
    font-size: 1.2em;
    line-height: 1.6;
    margin: 10px 0;
    color: #b8d4ff;
    font-style: italic;
}

.comic-sound {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    margin: 15px 0;
    letter-spacing: 2px;
}

.comic-image-placeholder-large {
    width: 100%;
    max-width: 600px;
    height: 400px;
    background: rgba(74, 144, 226, 0.2);
    border: 3px solid #4a90e2;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 8em;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
    position: relative;
}

.image-caption {
    font-size: 0.3em;
    margin-top: 20px;
    color: #b8d4ff;
    font-style: italic;
}

.comic-image-placeholder-large:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.4);
}

.back-to-list-btn {
    position: fixed;
    top: 30px;
    left: 30px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    font-size: 1.2em;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
    transition: all 0.3s ease;
    animation: fadeIn 0.8s ease-out;
}

.back-to-list-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.6);
    background: linear-gradient(135deg, #5ba0f2 0%, #4588cd 100%);
}

.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: all;
    animation: fadeIn 0.5s ease-out;
}

.scroll-top-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.6);
    background: linear-gradient(135deg, #5ba0f2 0%, #4588cd 100%);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.15);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease-out both;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lock-title {
        font-size: 1.8em;
    }
    
    .digit-box {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }
    
    .num-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }
    
    .comic-list-title {
        font-size: 2em;
    }
    
    .comic-text {
        font-size: 1.3em;
        padding: 20px;
    }
    
    .comic-title-page {
        font-size: 2.5em;
        padding: 40px 20px;
    }
    
    .comic-page-title {
        font-size: 1.6em;
    }
    
    .comic-dialogue {
        font-size: 1.1em;
    }
    
    .comic-narration {
        font-size: 1em;
    }
    
    .comic-sound {
        font-size: 1.5em;
    }
    
    .comic-image-placeholder-large {
        height: 250px;
        font-size: 5em;
    }
    
    .comic-panels-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .comic-panel-image {
        max-width: 100%;
    }
    
    .comic-panel-image-single {
        max-width: 100%;
    }
    
    .comic-panel-section {
        margin-bottom: 40px;
    }
}

