/* 
 * Premium Star Matching Calculator - Standalone CSS
 * No Tailwind Required - No Console Warnings
 */

/* Modal Backdrop */
.star-matching-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background-color: rgba(15, 23, 42, 0.85);
    /* slate-900/85 */
    backdrop-filter: blur(8px);
    padding: 1rem;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

.star-matching-content {
    background: #f8fafc;
    /* slate-50 */
    width: 100%;
    max-width: 650px;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.5s ease;
}

/* Header */
.sm-header {
    background: #1e1b4b;
    /* indigo-950 */
    padding: 1.5rem 2rem;
    text-align: center;
    position: relative;
}

.sm-header h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.sm-header p {
    color: #c7d2fe;
    /* indigo-200 */
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.sm-close {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.3s;
}

.sm-close:hover {
    color: white;
}

/* Modal Body */
.sm-body {
    padding: 1.5rem;
}

/* Form Step */
.sm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sm-person-card {
    background: white;
    padding: 1.25rem;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sm-person-card h3 {
    color: #4f46e5;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sm-input-group {
    margin-bottom: 0.75rem;
}

.sm-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    outline: none;
    transition: border-color 0.3s;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.sm-input:focus {
    border-color: #6366f1;
    border-width: 2px;
}

.sm-calculate-btn {
    width: 100%;
    margin-top: 1.5rem;
    background: #4f46e5;
    color: white;
    font-weight: 900;
    padding: 1rem;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
    transition: all 0.3s;
}

.sm-calculate-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.sm-calculate-btn:active {
    transform: scale(0.98);
}

/* Results Step */
.sm-result-card {
    background: white;
    padding: 2rem;
    border-radius: 2rem;
    border: 1px solid #f1f5f9;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.sm-wheel-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
}

.sm-wheel-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.sm-wheel-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sm-percentage {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1e293b;
    line-height: 1;
}

.sm-status {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 2px;
}

.sm-points-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.sm-tara-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0.25rem 0;
}

.sm-message {
    color: #64748b;
    font-size: 0.9rem;
    font-style: italic;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.5;
}

.sm-star-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.sm-star-box {
    background: #f5f3ff;
    padding: 1rem;
    border-radius: 1.25rem;
    text-align: center;
}

.sm-star-label {
    font-size: 0.65rem;
    font-weight: 900;
    color: #a5b4fc;
    text-transform: uppercase;
    display: block;
}

.sm-star-name {
    display: block;
    font-weight: 800;
    color: #312e81;
    font-size: 1rem;
}

.sm-star-tamil {
    display: block;
    font-size: 0.8rem;
    color: #6366f1;
    font-weight: 600;
}

.sm-reset-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    background: none;
    border: 2px solid #eef2ff;
    color: #4f46e5;
    font-weight: 900;
    border-radius: 1.25rem;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
}

.sm-reset-btn:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

/* Status Colors */
.text-emerald-500 {
    color: #10b981;
}

.text-rose-500 {
    color: #f43f5e;
}

.text-indigo-500 {
    color: #6366f1;
}

.text-orange-500 {
    color: #f97316;
}

.text-blue-500 {
    color: #3b82f6;
}

.text-red-500 {
    color: #ef4444;
}

.text-emerald-600 {
    color: #059669;
}

.text-rose-600 {
    color: #e11d48;
}

/* Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes animate-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: animate-in 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* --- MOBILE RESPONSIVE FIXES --- */
@media (max-width: 640px) {

    /* Ensure modal content doesn't get cut off at the top on small screens */
    .star-matching-modal {
        align-items: flex-start;
        padding: 1rem 0.5rem;
    }

    .star-matching-content {
        margin: 1rem auto;
        border-radius: 1.5rem;
        max-width: 100%;
    }

    .sm-header {
        padding: 1rem;
    }

    .sm-header h2 {
        font-size: 1.25rem;
    }

    .sm-body {
        padding: 1rem;
    }

    /* Stack inputs vertically */
    .sm-form-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .sm-person-card {
        padding: 1rem;
    }

    /* Keep birthday/time inputs side-by-side but smaller */
    .sm-person-card .sm-form-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem;
    }

    .sm-calculate-btn {
        padding: 0.85rem;
        font-size: 0.9rem;
    }

    /* Result Step Fixes */
    .sm-result-card {
        padding: 1.5rem 1rem;
    }

    .sm-wheel-container {
        width: 140px;
        height: 140px;
    }

    .sm-percentage {
        font-size: 1.8rem;
    }

    .sm-star-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .sm-star-box {
        padding: 0.75rem;
    }

    .sm-message {
        font-size: 0.85rem;
    }

    .sm-list-item {
        padding: 0.75rem 0.5rem !important;
    }
}