/* === Importazione Font === */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:wght@300;400;600&display=swap');

/* === Reset e Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background: #0a0e27;
    color: #e8e8f0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* === Sfondo Stellato Animato === */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 90%, white, transparent),
        radial-gradient(1px 1px at 15% 80%, white, transparent);
    background-size: 200% 200%;
    animation: twinkle 8s ease-in-out infinite;
    opacity: 0.6;
    z-index: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.4; }
}

/* === Container Principale === */
.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* === Header === */
.registry-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(20, 30, 60, 0.8), rgba(30, 20, 60, 0.6));
    border: 2px solid rgba(139, 169, 234, 0.3);
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.header-decoration {
    font-size: 2rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    margin: 10px 0;
}

.registry-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow:
        0 0 10px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.3),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 3px;
    margin: 20px 0;
}

.subtitle {
    font-size: 1.3rem;
    color: #b8c5e0;
    font-style: italic;
    letter-spacing: 1px;
    margin-top: 10px;
}

/* === Pannello di Selezione === */
.selection-panel {
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.7), rgba(40, 30, 70, 0.5));
    padding: 40px;
    border-radius: 15px;
    border: 2px solid rgba(139, 169, 234, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 30px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.6));
}

.stellar-select {
    width: 100%;
    padding: 15px 20px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    background: rgba(10, 14, 39, 0.8);
    color: #e8e8f0;
    border: 2px solid rgba(139, 169, 234, 0.4);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.stellar-select:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.stellar-select:focus {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.stellar-select option {
    background: #0a0e27;
    color: #e8e8f0;
    padding: 10px;
}

/* === Card della Dedica === */
.dedication-card {
    background: linear-gradient(135deg, rgba(30, 40, 80, 0.9), rgba(40, 30, 80, 0.8));
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    padding: 40px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(255, 215, 0, 0.1);
    backdrop-filter: blur(15px);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.star-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.card-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    letter-spacing: 2px;
}

.card-divider {
    height: 2px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 215, 0, 0.6),
        transparent
    );
    margin: 30px 0;
}

.dedication-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dedication-section {
    text-align: center;
}

.dedication-section .label {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: #b8c5e0;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.dedication-section .value {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.4;
}

.dedicated-to {
    color: #82aaff;
    text-shadow: 0 0 15px rgba(130, 170, 255, 0.5);
}

.dedicated-by {
    color: #c792ea;
    text-shadow: 0 0 15px rgba(199, 146, 234, 0.5);
}

.dedication-arrow {
    text-align: center;
    font-size: 2rem;
    color: #ffd700;
    opacity: 0.6;
}

.card-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.constellation-badge {
    font-family: 'Cinzel', serif;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.registry-seal {
    display: flex;
    align-items: center;
    gap: 8px;
}

.seal-text {
    font-family: 'Cinzel', serif;
    color: #4ade80;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: rgba(30, 40, 70, 0.3);
    border: 2px dashed rgba(139, 169, 234, 0.3);
    border-radius: 15px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state p {
    font-size: 1.3rem;
    color: #b8c5e0;
    font-style: italic;
}

/* === Footer === */
.registry-footer {
    margin-top: 60px;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid rgba(139, 169, 234, 0.2);
}

.registry-footer p {
    color: #7789a8;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .registry-header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .selection-panel {
        padding: 25px;
    }

    .dedication-card {
        padding: 25px;
    }

    .card-header h2 {
        font-size: 1.5rem;
    }

    .dedication-section .value {
        font-size: 1.5rem;
    }

    .card-footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }

    .registry-header h1 {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }

    .selection-panel {
        padding: 20px;
    }

    .stellar-select {
        padding: 12px 15px;
        font-size: 1rem;
    }
}
