/* ============================================================
   WishPuriKaro - CSS Styles
   ============================================================ */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================================
   Header
   ============================================================ */

.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 20px;
    border-radius: 12px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.header h1 {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.2em;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ============================================================
   Main Content
   ============================================================ */

.main-content {
    display: grid;
    gap: 30px;
}

/* ============================================================
   Input Section
   ============================================================ */

.input-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.form-container h2 {
    color: var(--text-primary);
    margin-bottom: 30px;
    font-size: 1.8em;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    font-family: inherit;
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

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

/* Options Container */
#optionsContainer {
    margin-bottom: 15px;
}

.option-input {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

.option-input input {
    flex: 1;
}

.option-input .btn-remove {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.option-input .btn-remove:hover {
    background: #dc2626;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn-primary,
.btn-secondary,
.btn-back {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 100%;
    padding: 14px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-back {
    background: var(--bg-color);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.btn-back:hover {
    background: var(--border-color);
}

/* ============================================================
   Results Section
   ============================================================ */

.results-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.results-container {
    max-width: 900px;
    margin: 0 auto;
}

.result-card {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--bg-color);
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
}

.result-card h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.4em;
}

.result-card.recommendation {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(99, 102, 241, 0.1));
    border-left-color: var(--success-color);
}

.recommendation-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.recommendation-box h3 {
    color: var(--success-color);
    margin-bottom: 10px;
}

.option-analysis {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.option-analysis h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.option-analysis p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 8px 0;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0;
}

.pros, .cons {
    padding: 15px;
    border-radius: 8px;
}

.pros {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--success-color);
}

.cons {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--danger-color);
}

.pros h4, .cons h4 {
    margin-bottom: 10px;
    font-size: 1.05em;
}

.pros h4 {
    color: var(--success-color);
}

.cons h4 {
    color: var(--danger-color);
}

.pros ul, .cons ul {
    list-style: none;
    padding-left: 20px;
}

.pros li, .cons li {
    margin: 8px 0;
    color: var(--text-secondary);
    position: relative;
}

.pros li::before {
    content: "✓ ";
    color: var(--success-color);
    font-weight: bold;
    position: absolute;
    left: -20px;
}

.cons li::before {
    content: "✗ ";
    color: var(--danger-color);
    font-weight: bold;
    position: absolute;
    left: -20px;
}

.action-items {
    border-left-color: var(--warning-color);
}

.action-items ol {
    padding-left: 25px;
    color: var(--text-secondary);
}

.action-items li {
    margin: 10px 0;
    line-height: 1.6;
}

/* ============================================================
   History Section
   ============================================================ */

.history-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.history-section h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
}

.history-container {
    display: grid;
    gap: 15px;
}

.history-item {
    padding: 15px;
    background: var(--bg-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.history-item h4 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.history-item p {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-style: italic;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    margin-top: 30px;
    font-size: 0.9em;
}

/* ============================================================
   Loading Spinner
   ============================================================ */

.spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ============================================================
   Responsive Design
   ============================================================ */

@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }

    .tagline {
        font-size: 1em;
    }

    .input-section,
    .results-section,
    .history-section {
        padding: 25px;
    }

    .form-container h2 {
        font-size: 1.5em;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }

    .result-card {
        padding: 20px;
    }

    .container {
        padding: 10px;
    }

    .result-card h2 {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 30px 15px;
        margin-bottom: 20px;
    }

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

    .btn-primary,
    .btn-secondary,
    .btn-back {
        padding: 10px 15px;
        font-size: 0.9em;
    }

    .option-input {
        flex-direction: column;
    }

    .option-input .btn-remove {
        width: 100%;
    }
}
