/* SayCharm Main Stylesheet */

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Page Management */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Auth Page Styles */
.main-container {
    display: grid;
    grid-template-columns: 1fr 450px;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

.left-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(167, 139, 250, 0.8));
    backdrop-filter: blur(20px);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.left-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.15"/><circle cx="10" cy="60" r="0.8" fill="%23ffffff" opacity="0.08"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.brand-section {
    position: relative;
    z-index: 2;
    margin-bottom: 50px;
}

.logo {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 40px;
    line-height: 1.4;
}

.hero-quote {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quote-text {
    font-size: 1.3rem;
    color: white;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quote-author {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 600;
}

.ratings-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.rating-preview {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.rating-preview:hover {
    transform: translateY(-5px);
}

.rating-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.rating-title {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 8px;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 8px;
}

.preview-star {
    color: #fbbf24;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rating-score {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 600;
}

.features-list {
    list-style: none;
    margin-bottom: 30px;
}

.feature-item {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-icon {
    color: #fbbf24;
    font-size: 1.3rem;
}

.auth-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 1rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 4px;
}

.tab-button {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
}

.tab-button.active {
    background: linear-gradient(145deg, #8b5cf6, #a78bfa);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

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

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fefefe;
}

.form-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.form-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 8px;
    display: none;
}

.success-message {
    color: #10b981;
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
    display: none;
    font-weight: 600;
}

.auth-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(145deg, #8b5cf6, #a78bfa);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    margin-bottom: 20px;
}

.auth-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    display: none;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak { background: #ef4444; }
.strength-medium { background: #f59e0b; }
.strength-strong { background: #10b981; }

.password-requirements {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #6b7280;
    display: none;
}

.requirement {
    display: flex;
    align-items: center;
    margin: 4px 0;
}

.requirement.met {
    color: #10b981;
}

.requirement-icon {
    margin-right: 6px;
    font-size: 0.7rem;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.remember-me input {
    margin-right: 8px;
    transform: scale(1.2);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    color: rgba(255, 255, 255, 0.15);
    font-size: 1.5rem;
    animation: float 6s ease-in-out infinite;
}

.floating-heart:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.floating-heart:nth-child(2) { top: 60%; left: 15%; animation-delay: 2s; }
.floating-heart:nth-child(3) { top: 30%; left: 80%; animation-delay: 4s; }
.floating-heart:nth-child(4) { top: 70%; left: 75%; animation-delay: 1s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Main App Styles */
.app-container {
    background: linear-gradient(135deg, #f0f4ff, #e0e7ff);
    min-height: 100vh;
    padding: 0;
}

.app-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-logo {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #8b5cf6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 30px;
    text-align: center;
}

.rating-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.rating-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rating-card:hover {
    transform: translateY(-5px);
}

.rating-card.work {
    border-top: 8px solid #2563eb;
}

.rating-card.family {
    border-top: 8px solid #ec4899;
}

.rating-card.money {
    border-top: 8px solid #10b981;
}

.rating-card.stress {
    border-top: 8px solid #f59e0b;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.work .card-icon {
    color: #2563eb;
}

.family .card-icon {
    color: #ec4899;
}

.money .card-icon {
    color: #10b981;
}

.stress .card-icon {
    color: #f59e0b;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
    text-align: center;
}

.card-description {
    font-size: 0.95rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.5;
}

.stars {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.star {
    font-size: 2.5rem;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.star:hover {
    transform: scale(1.1);
}

.star.filled-work {
    color: #2563eb;
    text-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.star.filled-family {
    color: #ec4899;
    text-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

.star.filled-money {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.star.filled-stress {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.rating-text {
    font-size: 0.9rem;
    color: #6b7280;
    min-height: 20px;
    text-align: center;
}

.action-section {
    text-align: center;
    margin: 40px 0;
}

.generate-btn {
    background: linear-gradient(145deg, #a78bfa, #8b5cf6);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: none;
    text-align: center;
    margin: 30px 0;
    color: #8b5cf6;
}

.loading .loading-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.response-container {
    background: #fdf4ff;
    border: 2px solid #e879f9;
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    display: none;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.response-text {
    font-size: 1.2rem;
    color: #7c3aed;
    font-weight: 600;
    font-style: italic;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 20px;
}

.response-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.response-btn {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.response-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.charts-section {
    margin: 50px 0;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

.history-section {
    margin-top: 50px;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.history-item {
    background: #f9fafb;
    border-left: 4px solid #8b5cf6;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    transition: transform 0.2s ease;
}

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

.history-date {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.history-ratings {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 600;
    margin-bottom: 10px;
}

.history-phrase {
    font-style: italic;
    color: #7c3aed;
    line-height: 1.5;
}

.no-history {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 40px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    transform: translateX(300px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #10b981;
    color: white;
}

.notification.error {
    background: #ef4444;
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .left-section {
        padding: 40px 30px;
        text-align: center;
    }

    .auth-section {
        padding: 40px 30px;
    }

    .ratings-showcase {
        grid-template-columns: repeat(2, 1fr);
    }

    .logo {
        font-size: 3rem;
    }

    .tagline {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .main-container {
        margin: 0;
    }

    .left-section, .auth-section {
        padding: 30px 20px;
    }

    .ratings-showcase {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .rating-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .star {
        font-size: 2rem;
    }

    .response-actions {
        flex-direction: column;
        align-items: center;
    }

    .response-btn {
        width: 200px;
    }

    .logo {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .quote-text {
        font-size: 1.1rem;
    }

    .auth-title {
        font-size: 1.8rem;
    }

    .chart-container {
        height: 300px;
    }
}