/**
 * Astroskop Natalna Karta - Frontend Styles
 * Version: 6.1 - Updated with purple theme
 */

/* ============================================
   GLOBAL STYLES
   ============================================ */
:root {
    --astro-primary: #8B0000;
    --astro-primary-hover: #a31919;
    --astro-purple: #6b21a8;
    --astro-purple-hover: #7c3aed;
    --astro-purple-light: #a855f7;
    --astro-bg-dark: #1e1e1e;
    --astro-bg-darker: #141414;
    --astro-bg-light: #2a2a2a;
    --astro-text: #f5f5f5;
    --astro-text-muted: #aaa;
    --astro-text-dimmed: #888;
    --astro-border: #444;
    --astro-border-light: #333;
    --astro-success: #27ae60;
    --astro-warning: #f39c12;
    --astro-danger: #e74c3c;
    --astro-info: #3498db;
}

/* ============================================
   FORM STYLES
   ============================================ */
.astro-natal-form-container {
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Sofia Sans', system-ui, -apple-system, sans-serif;
}

.astro-form-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.astro-form-title {
    color: var(--astro-text);
    font-size: 28px;
    text-align: center;
    margin: 0 0 10px 0;
    font-family: 'Oswald', sans-serif;
}

.astro-form-subtitle {
    color: var(--astro-text-muted);
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 15px;
}

.astro-field-group {
    margin-bottom: 20px;
}

.astro-field-group label {
    display: block;
    color: #ccc;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
}

.astro-field-group input,
.astro-field-group select {
    width: 100%;
    background: var(--astro-bg-light);
    border: 1px solid var(--astro-border);
    color: var(--astro-text);
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.astro-field-group input:focus,
.astro-field-group select:focus {
    outline: none;
    border-color: var(--astro-primary);
    box-shadow: 0 0 0 2px rgba(139,0,0,0.3);
}

.astro-date-selects {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 8px;
}

.astro-time-selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* ============================================
   BUTTON STYLES
   ============================================ */
.astro-buttons-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.astro-btn {
    padding: 16px 24px;
    border-radius: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

/* Glavno dugme - ljubičasto sa glow efektom */
.astro-btn-primary {
    flex: 1;
    background: var(--astro-purple);
    color: #fff;
    box-shadow: 0 0 0 0 rgba(107, 33, 168, 0);
}

.astro-btn-primary:hover {
    background: var(--astro-purple-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px rgba(107, 33, 168, 0.55), 0 0 0 4px rgba(107, 33, 168, 0.18);
}

/* Dugme za besplatan predlog - minimalistički */
.astro-btn-secondary {
    background: none;
    color: #94a3b8;
    font-size: 14px;
    padding: 8px 12px;
    border: none;
    white-space: nowrap;
}

.astro-btn-secondary:hover {
    background: none;
    color: #cbd5e1;
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}

.astro-btn span {
    display: block;
    font-size: 13px;
    font-weight: normal;
    opacity: 0.8;
    margin-top: 4px;
}

.astro-or-divider {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

/* ============================================
   LOADER STYLES
   ============================================ */
.astro-loader-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.astro-loader-overlay.active {
    display: flex;
}

.astro-loader-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid #333;
    border-top: 4px solid var(--astro-primary);
    border-radius: 50%;
    animation: astro-spin 1s linear infinite;
}

@keyframes astro-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.astro-loader-text {
    color: var(--astro-text);
    margin-top: 20px;
    font-size: 18px;
}

/* ============================================
   HEADER STYLES
   ============================================ */
.astro-natal-header {
    max-width: 600px;
    margin: 20px auto;
    font-family: 'Sofia Sans', sans-serif;
}

.astro-natal-header-card {
    background: var(--astro-bg-dark);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    border: 1px solid var(--astro-border-light);
}

.astro-header-zodiac {
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--astro-bg-light), var(--astro-bg-dark));
    border-radius: 50%;
    border: 3px solid var(--astro-primary);
}

.astro-header-zodiac .symbol {
    font-size: 48px;
    line-height: 1;
}

.astro-header-zodiac .znak-ime {
    font-size: 12px;
    color: var(--astro-text-muted);
    margin-top: 5px;
}

.astro-header-info {
    flex: 1;
}

.astro-header-name {
    color: var(--astro-text);
    font-size: 24px;
    margin: 0 0 10px 0;
    font-family: 'Oswald', sans-serif;
}

.astro-header-detail {
    color: var(--astro-text-muted);
    font-size: 14px;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.astro-header-detail strong {
    color: var(--astro-text);
}

/* ============================================
   ACCORDION STYLES
   ============================================ */
.astro-accordion {
    max-width: 600px;
    margin: 20px auto;
    font-family: 'Sofia Sans', sans-serif;
}

.astro-accordion-title {
    color: var(--astro-text);
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.accordion-item {
    background: var(--astro-bg-dark);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--astro-border-light);
    transition: border-color 0.3s;
}

.accordion-item:hover {
    border-color: var(--astro-border);
}

.accordion-item.active {
    border-color: var(--astro-primary);
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
}

.planet-icon img {
    width: 32px;
    height: 32px;
    margin-right: 15px;
    filter: brightness(1.2);
}

.planet-main {
    flex: 1;
}

.planet-name {
    color: var(--astro-text);
    font-weight: 600;
    font-size: 16px;
    display: block;
}

.degree {
    color: var(--astro-text-dimmed);
    font-size: 13px;
}

.planet-details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zodiac-sign {
    background: var(--astro-bg-light);
    color: var(--astro-text);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.house-number {
    color: var(--astro-text-muted);
    font-size: 13px;
}

.lock-icon {
    color: var(--astro-warning);
    font-size: 16px;
}

.accordion-toggle {
    color: var(--astro-text-muted);
    font-size: 20px;
    margin-left: 15px;
    transition: transform 0.3s;
}

.accordion-item.active .accordion-toggle {
    transform: rotate(90deg);
}

.accordion-content {
    display: none;
    padding: 0 20px 20px;
    color: #ccc;
    line-height: 1.6;
    font-size: 14px;
}

.accordion-item.active .accordion-content {
    display: block;
}

.locked-message {
    margin-top: 15px;
    padding: 12px;
    background: rgba(139, 0, 0, 0.1);
    border: 1px solid var(--astro-primary);
    border-radius: 8px;
    color: var(--astro-text-muted);
    font-size: 13px;
    text-align: center;
}

/* ============================================
   ASPECTS STYLES
   ============================================ */
.astro-aspekti-container {
    max-width: 600px;
    margin: 20px auto;
    font-family: 'Sofia Sans', sans-serif;
}

.astro-aspekti-title {
    color: var(--astro-text);
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
}

.astro-aspekt-card {
    background: var(--astro-bg-dark);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--astro-border-light);
}

.astro-aspekt-symbol {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.astro-aspekt-symbol.harmonican {
    background: rgba(39, 174, 96, 0.2);
    color: var(--astro-success);
}

.astro-aspekt-symbol.naporan {
    background: rgba(231, 76, 60, 0.2);
    color: var(--astro-danger);
}

.astro-aspekt-symbol.neutralan {
    background: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
}

.astro-aspekt-info {
    flex: 1;
}

.astro-aspekt-title-text {
    color: var(--astro-text);
    font-weight: 600;
    margin-bottom: 3px;
}

.astro-aspekt-angle {
    color: var(--astro-text-dimmed);
    font-size: 13px;
}

.astro-aspekt-lock {
    color: #666;
    font-size: 20px;
}

/* ============================================
   VISUAL CHART STYLES
   ============================================ */
.natalna-karta-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background-color: var(--astro-bg-darker);
    border-radius: 12px;
    font-family: 'Sofia Sans', sans-serif;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
}

#natalnaKarta {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    background: radial-gradient(circle, var(--astro-bg-light), #1a1a1a);
    cursor: crosshair;
}

/* ============================================
   CTA STYLES
   ============================================ */
.astro-cta-container {
    max-width: 600px;
    margin: 30px auto;
    text-align: center;
    font-family: 'Sofia Sans', sans-serif;
}

.astro-cta-card {
    background: linear-gradient(135deg, var(--astro-bg-dark) 0%, #2a1a1a 100%);
    border-radius: 16px;
    padding: 35px;
    border: 2px solid var(--astro-primary);
}

.astro-cta-title {
    color: var(--astro-text);
    font-size: 24px;
    margin: 0 0 10px 0;
    font-family: 'Oswald', sans-serif;
}

.astro-cta-desc {
    color: #ccc;
    margin: 0 0 25px 0;
    font-size: 16px;
    line-height: 1.6;
}

.astro-cta-features {
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
}

.astro-cta-feature {
    color: var(--astro-text);
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.astro-cta-feature::before {
    content: '✓';
    color: var(--astro-success);
    font-weight: bold;
}

.astro-cta-btn {
    display: inline-block;
    background: var(--astro-primary);
    color: #fff;
    padding: 18px 40px;
    border-radius: 10px;
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.astro-cta-btn:hover {
    background: var(--astro-primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139,0,0,0.4);
    color: #fff;
}

.astro-cta-price {
    display: block;
    font-size: 14px;
    font-weight: normal;
    margin-top: 5px;
    opacity: 0.9;
}

/* ============================================
   CHECKOUT STYLES
   ============================================ */
.astro-checkout-container {
    max-width: 600px;
    margin: 20px auto;
    font-family: 'Sofia Sans', sans-serif;
}

.astro-checkout-card {
    background: var(--astro-bg-dark);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--astro-border-light);
}

.astro-checkout-title {
    color: var(--astro-text);
    font-size: 24px;
    margin: 0 0 25px 0;
    text-align: center;
    font-family: 'Oswald', sans-serif;
}

.astro-checkout-summary {
    background: var(--astro-bg-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.astro-checkout-summary h4 {
    color: var(--astro-text);
    margin: 0 0 15px 0;
    font-size: 16px;
}

.astro-checkout-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--astro-border-light);
    color: var(--astro-text-muted);
    font-size: 14px;
}

.astro-checkout-row:last-child {
    border-bottom: none;
}

.astro-checkout-row strong {
    color: var(--astro-text);
}

.astro-checkout-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0 0;
    margin-top: 15px;
    border-top: 2px solid var(--astro-primary);
    font-size: 20px;
    color: var(--astro-text);
}

.astro-checkout-total strong {
    color: var(--astro-primary);
}

/* ============================================
   ERROR STYLES
   ============================================ */
.astro-error {
    color: #ffb4b4;
    background: #2a1010;
    border: 1px solid #3a1a1a;
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
}

/* ============================================
   GOOGLE PLACES AUTOCOMPLETE
   ============================================ */
.pac-container {
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
    z-index: 100000 !important;
    border-radius: 8px !important;
    margin-top: 5px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

.pac-item {
    padding: 12px 15px !important;
    color: #333 !important;
    background: #fff !important;
    border-bottom: 1px solid #eee !important;
    cursor: pointer !important;
}

.pac-item:hover {
    background: #f8f5ff !important;
}

.pac-item-query {
    color: #333 !important;
}

.pac-matched {
    color: var(--astro-purple) !important;
    font-weight: bold !important;
}

.pac-icon {
    display: none !important;
}

.pac-item-selected {
    background: #f0e6ff !important;
}

/* ============================================
   MODAL STYLES
   ============================================ */
.astro-visual-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    display: none;
}

.astro-visual-modal.active {
    display: block;
}

.astro-visual-modal-content {
    background-color: var(--astro-bg-dark);
    margin: 10% auto;
    padding: 20px;
    border-radius: 12px;
    width: min(90%, 600px);
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    color: var(--astro-text);
    border: 1px solid var(--astro-border-light);
}

.astro-visual-close {
    color: var(--astro-text-dimmed);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.astro-visual-close:hover {
    color: var(--astro-text);
}

.astro-visual-modal h3 {
    color: var(--astro-text);
    margin-bottom: 15px;
    font-size: 22px;
    text-align: center;
}

.astro-visual-modal .planeta-info {
    background-color: var(--astro-bg-darker);
    color: var(--astro-text);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid var(--astro-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.astro-visual-modal .planeta-info img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.astro-visual-modal .planeta-title {
    font-size: 18px;
    font-weight: bold;
}

.astro-visual-modal .planeta-details {
    font-size: 14px;
    color: var(--astro-text-muted);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 768px) {
    .astro-form-card {
        padding: 25px 20px;
    }
    
    .astro-buttons-container {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .astro-btn-primary {
        width: 100%;
    }
    
    .astro-btn-secondary {
        align-self: center;
        font-size: 13px;
    }
    
    .astro-or-divider {
        text-align: center;
        padding: 5px 0;
    }
    
    .astro-natal-header-card {
        flex-direction: column;
        text-align: center;
    }
    
    .natalna-karta-container {
        margin: 10px;
        max-width: 95vw;
        padding: 8px;
    }
    
    .astro-visual-modal-content {
        margin: 5% auto;
        padding: 15px;
        width: 95%;
        max-height: 85vh;
    }
    
    .astro-visual-modal .planeta-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .astro-cta-card {
        padding: 25px 20px;
    }
}

@media (max-width: 480px) {
    .astro-form-title {
        font-size: 24px;
    }
    
    .astro-date-selects {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .astro-header-zodiac {
        width: 80px;
        height: 80px;
    }
    
    .astro-header-zodiac .symbol {
        font-size: 36px;
    }
    
    .accordion-header {
        padding: 12px 15px;
    }
    
    .planet-icon img {
        width: 28px;
        height: 28px;
        margin-right: 10px;
    }
}