/* Foundational Styles for Dra IA */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gold: #AC996C;
    --primary-gold-light: rgba(172, 153, 108, 0.1);
    --primary-gold-medium: rgba(172, 153, 108, 0.2);
    --primary-gold-dark: #8b7355;
    --bg-light: #F9F9F9;
    --bg-gradient: linear-gradient(135deg, #ffffff 0%, #fdf6e3 100%);
    --text-main: #444444;
    --text-muted: rgba(136, 136, 136, 0.8);
    --shadow-soft: 0 5px 30px rgba(136, 136, 136, 0.15);
    --shadow-gold: 0 4px 15px rgba(212, 175, 55, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
}

/* Shared Components */

.container {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.header {
    background: white;
    border-bottom: 1px solid rgba(136, 136, 136, 0.2);
    padding: 40px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--primary-gold);
    font-weight: 300;
    letter-spacing: -1px;
}

.header p {
    color: var(--text-muted);
    font-size: 1.1em;
    font-weight: 400;
}

/* Buttons */

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-gold-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(172, 153, 108, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(172, 153, 108, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-gold);
    border: 1px solid var(--primary-gold-medium);
}

.btn-secondary:hover {
    background: var(--primary-gold-light);
    border-color: var(--primary-gold);
}

/* Loaders & Spinners */

.loader {
    text-align: center;
    padding: 50px;
}

.triangle-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    position: relative;
    animation: pulseRotate 3s infinite linear;
}

.triangle-spinner svg {
    display: none;
    /* Hide old SVG */
}

.triangle-spinner::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background-image: url('/icons/DTB_1-192.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

@keyframes pulseRotate {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.1) rotate(180deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(360deg);
        opacity: 0.9;
    }
}

/* Responsive */

@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
    }

    .header {
        padding: 25px 15px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .btn {
        width: 100%;
        padding: 12px 20px;
    }
}

/* PWA Update Notification */
#pwa-update-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: white;
    color: var(--primary-gold);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--primary-gold-medium);
    font-weight: 500;
    white-space: nowrap;
}

#pwa-update-toast.show {
    transform: translateX(-50%) translateY(0);
}

#pwa-update-toast .update-btn {
    background: var(--primary-gold);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

#pwa-update-toast .update-btn:hover {
    background: var(--primary-gold-dark);
}

#pwa-update-toast {
    display: none !important;
}

/* Shared Toast Notification System */
.dra-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: white;
    color: var(--primary-gold);
    padding: 12px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    transition: transform 0.3s ease;
    border: 1px solid var(--primary-gold-medium);
    font-weight: 500;
}

.dra-toast.show {
    transform: translateX(-50%) translateY(0);
}

.dra-toast.hide {
    transform: translateX(-50%) translateY(150%);
}