/* Frontend Styles for Ashtakoot Calculator - Love & Astrology Theme */

.ashtakoot-calculator {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.ashtakoot-intro {
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
}

.ashtakoot-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: pulse 2s ease-in-out infinite;
}

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

.ashtakoot-intro h2 {
    margin: 0 0 15px;
    font-size: 36px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.ashtakoot-tagline {
    margin: 0;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    font-style: italic;
    line-height: 1.6;
}

.astro-decoration {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.star, .heart {
    font-size: 20px;
    animation: twinkle 1.5s ease-in-out infinite;
}

.star:nth-child(1) { animation-delay: 0s; }
.heart { animation-delay: 0.5s; }
.star:nth-child(3) { animation-delay: 1s; }

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

.ashtakoot-form {
    background: #fff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    position: relative;
}

.ashtakoot-form-section {
    margin-bottom: 35px;
    padding: 25px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffeef8 0%, #fff5f7 100%);
    border: 2px solid #ffd6e7;
}

.female-section {
    background: linear-gradient(135deg, #fff0f5 0%, #ffe4f1 100%);
    border-color: #ffb6d9;
}

.male-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e4edff 100%);
    border-color: #b6d4ff;
}

.ashtakoot-form-section:last-of-type {
    margin-bottom: 30px;
}

.ashtakoot-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.ashtakoot-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #4a148c;
    margin: 0 0 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid rgba(102, 126, 234, 0.2);
}

.section-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.section-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hearts-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    padding: 20px 0;
}

.divider-heart {
    font-size: 28px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.divider-heart:first-child { animation-delay: 0s; }
.divider-heart:last-child { animation-delay: 0.75s; }

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #ff69b4 50%, transparent 100%);
}

.ashtakoot-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.ashtakoot-form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.ashtakoot-form-group-full {
    grid-column: 1 / -1;
}

.ashtakoot-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a148c;
    font-size: 14px;
}

.required {
    color: #e91e63;
    margin-left: 2px;
    font-size: 16px;
}

.optional-badge {
    font-size: 12px;
    font-weight: 400;
    color: #9c27b0;
    font-style: italic;
    margin-left: 5px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

.input-with-icon input {
    padding-left: 40px !important;
}

.ashtakoot-form-group input,
.ashtakoot-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1bee7;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.ashtakoot-form-group input:focus,
.ashtakoot-form-group select:focus {
    outline: none;
    border-color: #9c27b0;
    box-shadow: 0 0 0 4px rgba(156, 39, 176, 0.1);
    transform: translateY(-1px);
}

/* Date and time inputs */
.ashtakoot-form-group input[type="date"],
.ashtakoot-form-group input[type="time"] {
    cursor: pointer;
}

.ashtakoot-form-group input[type="date"]::-webkit-calendar-picker-indicator,
.ashtakoot-form-group input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    font-size: 18px;
    filter: invert(34%) sepia(77%) saturate(2346%) hue-rotate(286deg) brightness(85%) contrast(94%);
}

/* Location suggestions */
.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #e1bee7;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    display: none;
    margin-top: -2px;
}

.location-suggestions.active {
    display: block;
}

.location-suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3e5f5;
}

.location-suggestion-item:last-child {
    border-bottom: none;
}

.location-suggestion-item:hover,
.location-suggestion-item:focus {
    background: linear-gradient(135deg, #f3e5f5 0%, #fce4ec 100%);
    outline: none;
}

.location-suggestion-item.selected {
    background: linear-gradient(135deg, #e1bee7 0%, #f8bbd0 100%);
}

.location-suggestion-city {
    font-weight: 600;
    color: #4a148c;
}

.location-suggestion-details {
    font-size: 12px;
    color: #7b1fa2;
    margin-top: 3px;
}

.selected-location {
    margin-top: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 2px solid #81c784;
    border-radius: 8px;
    font-size: 13px;
    color: #2e7d32;
    display: flex;
    align-items: center;
}

.location-selected-icon {
    margin-right: 8px;
    font-size: 16px;
}

.location-loading,
.location-error {
    padding: 12px 15px;
    text-align: center;
    font-size: 13px;
}

.location-loading {
    color: #7b1fa2;
}

.location-error {
    color: #c2185b;
}

.field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #7b1fa2;
    font-style: italic;
}

.ashtakoot-form-group input:focus,
.ashtakoot-form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.ashtakoot-form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e74c3c;
}

.field-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #7f8c8d;
}

.ashtakoot-form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 30px;
    justify-content: center;
}

.ashtakoot-submit-btn,
.ashtakoot-reset-btn {
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ashtakoot-submit-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.ashtakoot-submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.5);
}

.ashtakoot-submit-btn:disabled {
    background: linear-gradient(135deg, #bdbdbd 0%, #9e9e9e 100%);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.ashtakoot-reset-btn {
    background: #fff;
    color: #7b1fa2;
    border: 2px solid #e1bee7;
}

.ashtakoot-reset-btn:hover {
    background: #f3e5f5;
    border-color: #ce93d8;
}

.ashtakoot-submit-btn:focus,
.ashtakoot-reset-btn:focus {
    outline: 3px solid rgba(156, 39, 176, 0.3);
    outline-offset: 2px;
}

.btn-icon {
    font-size: 20px;
}

.btn-text {
    letter-spacing: 0.5px;
}

/* Loading Spinner - Cosmic Theme */
.ashtakoot-loading {
    text-align: center;
    padding: 60px 20px;
    margin: 30px 0;
    background: linear-gradient(135deg, #f3e5f5 0%, #fce4ec 100%);
    border-radius: 15px;
    border: 2px solid #e1bee7;
}

.loading-animation {
    margin-bottom: 20px;
}

.cosmic-spinner {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: rotate 3s linear infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #667eea;
    animation-duration: 2s;
}

.spinner-ring:nth-child(2) {
    border-right-color: #764ba2;
    animation-duration: 2.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: #f093fb;
    animation-duration: 3s;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner-planet {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-text {
    font-size: 20px;
    font-weight: 600;
    color: #4a148c;
    margin: 15px 0 5px;
}

.loading-subtext {
    font-size: 14px;
    color: #7b1fa2;
    font-style: italic;
}

/* Messages */
.ashtakoot-message {
    padding: 18px 25px;
    margin: 25px 0;
    border-radius: 12px;
    font-size: 15px;
}

.ashtakoot-error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border: 2px solid #ef5350;
}

/* Results - Love Theme */
.ashtakoot-results {
    margin-top: 40px;
    padding: 40px;
    background: linear-gradient(135deg, #fff 0%, #faf3ff 100%);
    border: 3px solid #e1bee7;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(156, 39, 176, 0.15);
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid #e1bee7;
    position: relative;
}

.results-header::after {
    content: '💕';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 0 15px;
    font-size: 24px;
}

.results-header h3 {
    margin: 0 0 15px;
    font-size: 32px;
    color: #4a148c;
    font-weight: 700;
}

.couple-names {
    font-size: 24px;
    color: #7b1fa2;
    margin: 10px 0 20px;
    font-weight: 600;
}

.couple-names .name {
    color: #e91e63;
}

.couple-names .heart-separator {
    margin: 0 10px;
    font-size: 20px;
}

.total-score {
    display: inline-block;
    padding: 25px 50px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border-radius: 15px;
    font-size: 42px;
    font-weight: 900;
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
    position: relative;
}

.total-score::before {
    content: '✨';
    position: absolute;
    top: -15px;
    left: -15px;
    font-size: 30px;
    animation: twinkle 1.5s ease-in-out infinite;
}

.total-score::after {
    content: '✨';
    position: absolute;
    bottom: -15px;
    right: -15px;
    font-size: 30px;
    animation: twinkle 1.5s ease-in-out infinite 0.75s;
}

.compatibility-level {
    margin-top: 20px;
    font-size: 24px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
}

.compatibility-level.excellent {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    color: #1b5e20;
}

.compatibility-level.good {
    background: linear-gradient(135deg, #b3e5fc 0%, #81d4fa 100%);
    color: #01579b;
}

.compatibility-level.average {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    color: #f57f17;
}

.compatibility-level.poor {
    background: linear-gradient(135deg, #ffccbc 0%, #ffab91 100%);
    color: #bf360c;
}

.compatibility-description {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    font-size: 16px;
    color: #4a148c;
    line-height: 1.8;
    font-style: italic;
}

.share-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f3e5f5 0%, #fce4ec 100%);
    border-radius: 12px;
    text-align: center;
}

.share-title {
    font-size: 18px;
    color: #4a148c;
    margin-bottom: 15px;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
}

.share-btn-whatsapp {
    background: #25D366;
}

.share-btn-whatsapp:hover {
    background: #1ebe57;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.share-btn-facebook {
    background: #1877F2;
}

.share-btn-facebook:hover {
    background: #0d66d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.share-btn-twitter {
    background: #1DA1F2;
}

.share-btn-twitter:hover {
    background: #0c8bd9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.4);
}

.share-btn-copy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.share-btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.share-btn-icon {
    font-size: 18px;
}

.kootam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.kootam-card {
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #faf3ff 100%);
    border: 2px solid #e1bee7;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kootam-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.kootam-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(156, 39, 176, 0.2);
    border-color: #ce93d8;
}

.kootam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(156, 39, 176, 0.1);
}

.kootam-name {
    font-size: 18px;
    font-weight: 700;
    color: #4a148c;
}

.kootam-score {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kootam-description {
    font-size: 13px;
    color: #7b1fa2;
    margin-bottom: 12px;
    font-weight: 600;
    font-style: italic;
}

.kootam-details {
    font-size: 14px;
    color: #6a1b9a;
    line-height: 1.7;
}

.kootam-details p {
    margin: 8px 0;
    padding: 8px;
    background: rgba(243, 229, 245, 0.5);
    border-radius: 6px;
}

.kootam-details strong {
    color: #4a148c;
    font-weight: 600;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .ashtakoot-calculator {
        padding: 15px;
        border-radius: 15px;
    }
    
    .ashtakoot-intro h2 {
        font-size: 28px;
    }
    
    .ashtakoot-tagline {
        font-size: 16px;
    }
    
    .ashtakoot-form {
        padding: 25px 20px;
    }
    
    .ashtakoot-form-section {
        padding: 20px 15px;
    }
    
    .ashtakoot-section-title {
        font-size: 20px;
    }
    
    .ashtakoot-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .total-score {
        padding: 20px 35px;
        font-size: 36px;
    }
    
    .couple-names {
        font-size: 20px;
    }
    
    .kootam-grid {
        grid-template-columns: 1fr;
    }
    
    .ashtakoot-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ashtakoot-submit-btn,
    .ashtakoot-reset-btn {
        width: 100%;
        justify-content: center;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .ashtakoot-form-group input:focus,
    .ashtakoot-form-group select:focus {
        outline: 3px solid;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cosmic-spinner .spinner-ring {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .ashtakoot-form,
    .ashtakoot-form-actions,
    .ashtakoot-loading,
    .share-section {
        display: none;
    }
    
    .ashtakoot-calculator {
        background: #fff;
        box-shadow: none;
    }
    
    .ashtakoot-results {
        box-shadow: none;
        border: 2px solid #000;
    }
}
