/* Biorhyth.me - Main Stylesheet */

/* ==================== CSS Variables ==================== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --physical-color: #e74c3c;
    --emotional-color: #f39c12;
    --intellectual-color: #3498db;
    --positive-color: #28a745;
    --negative-color: #dc3545;
    --text-color: #333;
    --text-muted: #666;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* ==================== Base Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* ==================== Header ==================== */
header {
    background: var(--primary-gradient);
    padding: 15px 0;
    box-shadow: var(--shadow);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-image {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.logo h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
}

nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: white;
}

/* ==================== Main Content ==================== */
main {
    flex: 1;
    padding: 40px 0;
}

/* ==================== Hero Section ==================== */
.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero h2 {
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.tagline {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* ==================== Cards ==================== */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.main-card {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== Forms ==================== */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    width: 100%;
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-color);
}

/* ==================== Social Login Buttons ==================== */
.social-login-card {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.social-login-card h3 {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-weight: 500;
}

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

.btn-social {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.9rem;
    min-width: 140px;
    justify-content: center;
}

.btn-social:hover {
    border-color: var(--primary-color);
}

.btn-google { border-color: #4285f4; }
.btn-facebook { border-color: #1877f2; }
.btn-twitter { border-color: #1da1f2; }
.btn-apple { border-color: #000; }
.btn-github { border-color: #333; }
.btn-linkedin { border-color: #0077b5; }
.btn-vk { border-color: #4a76a8; }
.btn-yandex { border-color: #fc0; }
.btn-wechat { border-color: #09b83e; }

.social-buttons-small {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.btn-social-small {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-color);
    font-size: 1.2rem;
}

.or-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.or-divider span {
    padding: 0 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==================== Icon placeholders ==================== */
.icon {
    display: inline-block;
    width: 18px;
    height: 18px;
}

.icon-google::before { content: "G"; font-weight: bold; color: #4285f4; }
.icon-facebook::before { content: "f"; font-weight: bold; color: #1877f2; }
.icon-twitter::before { content: "X"; font-weight: bold; color: #000; }
.icon-apple::before { content: ""; font-weight: bold; }
.icon-github::before { content: ""; }
.icon-linkedin::before { content: "in"; font-weight: bold; color: #0077b5; font-size: 12px; }
.icon-vk::before { content: "VK"; font-weight: bold; color: #4a76a8; font-size: 10px; }
.icon-yandex::before { content: "Y"; font-weight: bold; color: #f00; }
.icon-wechat::before { content: ""; }

/* ==================== Info Section ==================== */
.info-section {
    margin-top: 60px;
}

.info-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

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

.info-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    text-align: center;
}

.info-card.physical { border-top: 4px solid var(--physical-color); }
.info-card.emotional { border-top: 4px solid var(--emotional-color); }
.info-card.intellectual { border-top: 4px solid var(--intellectual-color); }

.cycle-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.info-card h3 {
    margin-bottom: 5px;
}

.cycle-length {
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 15px;
}

.how-it-works {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.how-it-works h2 {
    text-align: left;
    margin-bottom: 20px;
}

.how-it-works h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.how-it-works ul {
    margin-left: 20px;
}

.how-it-works li {
    margin-bottom: 8px;
}

.formula {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    text-align: center;
    font-size: 1.1rem;
}

/* ==================== Result Page ==================== */
.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.birthday-display {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.chart-card {
    padding: 20px;
}

#biorhythmChart {
    width: 100% !important;
    height: 400px !important;
}

.today-summary {
    text-align: center;
}

.today-summary h3 {
    margin-bottom: 20px;
}

.cycle-values {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.cycle-value {
    text-align: center;
}

.cycle-value .label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.cycle-value .value {
    font-size: 2rem;
    font-weight: 700;
}

.cycle-value.physical .value { color: var(--physical-color); }
.cycle-value.emotional .value { color: var(--emotional-color); }
.cycle-value.intellectual .value { color: var(--intellectual-color); }

.value.positive { color: var(--positive-color) !important; }
.value.negative { color: var(--negative-color) !important; }

.today-description {
    font-style: italic;
    color: var(--text-muted);
}

.predictions {
    padding: 20px;
}

.prediction-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.prediction {
    flex: 1;
    min-width: 250px;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
}

.best-day {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.worst-day {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.prediction h4 {
    margin-bottom: 10px;
}

.prediction .date {
    font-size: 1.2rem;
    font-weight: 600;
}

.prediction .average {
    color: var(--text-muted);
}

.subscribe-cta {
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
}

.subscribe-cta h3 {
    margin-bottom: 10px;
}

.subscribe-cta p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ==================== Data Table ==================== */
.data-table h3 {
    margin-bottom: 20px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-color);
    font-weight: 600;
}

.today-row {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.today-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 5px;
}

td.positive { color: var(--positive-color); font-weight: 600; }
td.negative { color: var(--negative-color); font-weight: 600; }

/* ==================== Confirmation Pages ==================== */
.confirmation-page {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
}

.success-icon, .error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
}

.success-icon {
    background: var(--positive-color);
    color: white;
}

.error-icon {
    background: var(--negative-color);
    color: white;
}

.confirmation-message {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.next-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* ==================== Subscribe Page ==================== */
.subscribe-form {
    margin-bottom: 30px;
}

.subscribe-info {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.subscribe-info h4 {
    margin-bottom: 15px;
}

.subscribe-info ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.subscribe-info li {
    margin-bottom: 8px;
    color: var(--text-muted);
}

.privacy-note {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ==================== Alerts ==================== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ==================== Footer ==================== */
footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0;
    margin-top: auto;
}

.disclaimer {
    background: rgba(0, 0, 0, 0.2);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.disclaimer h4 {
    margin-bottom: 15px;
    color: #f39c12;
}

.disclaimer p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 10px;
    opacity: 0.9;
}

.footer-links {
    text-align: center;
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ==================== Legal Pages ==================== */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.legal-page h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.legal-page .last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.legal-page section {
    margin-bottom: 30px;
}

.legal-page h2 {
    color: var(--text-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.legal-page h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin: 20px 0 10px 0;
}

.legal-page p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.legal-page ul {
    margin: 15px 0 15px 25px;
}

.legal-page li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.legal-page a {
    color: var(--primary-color);
}

.legal-page a:hover {
    text-decoration: underline;
}

/* ==================== Unsubscribe Page ==================== */
.unsubscribe-form {
    margin-bottom: 30px;
}

.unsubscribe-info {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.unsubscribe-info p {
    margin-bottom: 10px;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav {
        margin-top: 15px;
    }

    nav a {
        margin: 0 10px;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .cycle-values {
        gap: 20px;
    }

    .cycle-value .value {
        font-size: 1.5rem;
    }

    .prediction-row {
        flex-direction: column;
    }

    #biorhythmChart {
        height: 300px !important;
    }
}
