* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, serif;
    background: linear-gradient(135deg, #f4eadf, #fffaf4);
    color: #2f2923;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 32px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

    .login-card h1 {
        font-size: 32px;
    }

    .login-card p {
        font-size: 18px;
    }

input {
    width: 100%;
    margin-top: 18px;
    padding: 15px;
    border-radius: 999px;
    border: 1px solid #d8c7b8;
    font-size: 16px;
    text-align: center;
}

button {
    border: none;
    cursor: pointer;
    border-radius: 999px;
    background: #6f4e37;
    color: white;
    padding: 14px 24px;
    font-size: 16px;
    margin-top: 16px;
}

.error {
    color: #b00020;
    font-size: 14px;
}

.app {
    max-width: 900px;
    margin: auto;
    padding: 32px 20px;
}

header {
    text-align: center;
    margin-bottom: 28px;
}

    header h1 {
        font-size: 38px;
        margin-bottom: 8px;
    }

    header p {
        font-size: 18px;
        opacity: 0.8;
    }

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.memory-card {
    background: rgba(255,255,255,0.92);
    border-radius: 28px;
    padding: 28px 22px;
    text-align: center;
    box-shadow: 0 14px 35px rgba(0,0,0,0.10);
    transition: 0.25s ease;
}

    .memory-card:hover {
        transform: translateY(-4px) scale(1.01);
    }

    .memory-card span {
        font-size: 42px;
    }

    .memory-card h2 {
        font-size: 22px;
        margin-bottom: 0;
    }

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.modal-content {
    position: relative;
    width: min(90vw, 900px);
    max-height: 90vh;
    background: white;
    border-radius: 32px;
    padding: 28px;
    text-align: center;
    overflow-y: auto;
    animation: pop 0.25s ease;
}

.close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    color: #2f2923;
    font-size: 30px;
    padding: 4px 10px;
    margin: 0;
}

#modalImage {
    display: block;
    max-width: 100%;
    max-height: 45vh;
    width: auto;
    height: auto;
    margin: 20px auto;
    border-radius: 20px;
    object-fit: contain;
}

.image-buttons {
    margin-top: 14px;
}

    .image-buttons button {
        margin: 6px;
        padding: 10px 14px;
    }

@keyframes pop {
    from {
        transform: scale(0.96);
        opacity: 0.5;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media (min-width: 700px) {
    .grid {
        grid-template-columns: 1fr 1fr;
    }
}
