.passport-page {
    background-color: var(--bg-color);
}

.passport-container {
    max-width: 1200px;
    width: 95%;
    margin: 2rem auto;
    padding: 3rem;
    background: #fff; /* Looks like a booklet */
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    border: 2px solid #EAE0C8;
}

.passport-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px dashed #EAE0C8;
}

.passport-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.tier-progress-container {
    width: 100%;
    max-width: 400px;
    height: 12px;
    background: #EAE0C8;
    border-radius: var(--border-radius-pill);
    margin: 0 auto 1rem;
    overflow: hidden;
}

.tier-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: var(--border-radius-pill);
    transition: width 0.5s ease-out, background-color 0.5s ease;
}

#tier-status-text {
    font-weight: bold;
    color: var(--text-light);
}

.stamps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

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

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

.stamp-box {
    border: 2px solid #EAE0C8;
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    position: relative;
    background: #FAF8F2;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stamp-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stamp-box.earned {
    border-color: var(--secondary-color);
    background: #FFFBF0;
}

.stamp-region-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.stamp-progress {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: bold;
}

.stamp-icon-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stamp-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px dashed var(--secondary-color);
    border-radius: 50%;
    opacity: 0.5;
    animation: rotateRing 10s linear infinite;
}

@keyframes rotateRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.stamp-icon {
    font-size: 3.5rem;
    opacity: 0.2;
    filter: grayscale(100%);
    transition: all 0.4s ease;
    z-index: 2;
}

.stamp-box.earned .stamp-icon {
    opacity: 1;
    filter: none;
    animation: stampIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes stampIn {
    0% { transform: scale(2) rotate(-20deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.total-stories-badge {
    display: inline-block;
    background-color: #EAE0C8;
    color: var(--text-color);
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius-pill);
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

[data-theme="night"] .total-stories-badge {
    background-color: #3B3B66;
    color: #fff;
}

[data-theme="night"] .passport-container {
    background: #252542;
    border-color: #3B3B66;
}

[data-theme="night"] .stamp-box {
    background: #1E1E36;
    border-color: #3B3B66;
}

[data-theme="night"] .passport-header {
    border-bottom-color: #3B3B66;
}

[data-theme="night"] .tier-progress-container {
    background: #3B3B66;
}
