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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header Section */
.header-section {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header-section h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 2.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header-section .description {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 25px auto 0;
}

.branding {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 300;
    margin-top: 0;
    margin-bottom: 0;
    letter-spacing: 0.5px;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px 30px;
    border-bottom: 1px solid #e0e6ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.card-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Mode Toggle Buttons */
.mode-toggle-buttons {
    display: flex;
    gap: 8px;
    background: #e9ecef;
    padding: 4px;
    border-radius: 8px;
}

.mode-btn {
    padding: 8px 20px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    background: rgba(108, 117, 125, 0.1);
}

.mode-btn.active {
    background: #2c3e50;
    color: white;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.3);
}

.card-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 5px 0 0 0;
}

/* Input Styles */
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.input-group {
    position: relative;
}

label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    gap: 8px;
}

.tooltip {
    background: #3498db;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    position: relative;
    margin-left: auto;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 30px;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: normal;
    white-space: nowrap;
    max-width: 250px;
    white-space: normal;
    width: max-content;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

input[type="number"] {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

/* Hint text under inputs */
.hint {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

.input-group.error input {
    border-color: #e74c3c;
}

.input-group.error .hint {
    color: #e74c3c;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 1.2rem;
}

.dark-mode-toggle:hover {
    transform: translateY(-2px) rotate(15deg);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* Preset Buttons */
.preset-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.preset-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f99);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.preset-btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.preset-btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Export Controls */
.export-controls {
    display: flex;
}

/* Admin Dashboard */
.admin-dashboard {
    margin-top: 30px;
}

.admin-content {
    padding: 30px;
}

.admin-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #e9ecef;
}

.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.admin-metrics {
    margin-top: 20px;
}

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

.metric-card {
    background: linear-gradient(135deg, #f8f9fa, #fff);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e6ed;
    text-align: center;
}

.metric-card h3 {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.breakdown-section {
    margin-top: 30px;
}

.breakdown-section h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.breakdown-list {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #e0e6ed;
}

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

/* Dark Mode Styles */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --border-color: #e0e6ed;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
}

body.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2c2c2c;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: #404040;
    --card-bg: #2c2c2c;
    --input-bg: #333333;
    
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

body.dark-mode .card {
    background: var(--card-bg);
    color: var(--text-primary);
}

body.dark-mode input[type="number"],
body.dark-mode select {
    background: var(--input-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.dark-mode .header-section h1,
body.dark-mode .header-section p,
body.dark-mode label,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
    color: var(--text-primary);
}

body.dark-mode .card-subtitle,
body.dark-mode .hint,
body.dark-mode small {
    color: var(--text-secondary);
}

body.dark-mode .footer {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

body.dark-mode .footer a {
    color: #3498db;
}

/* Funding Mode Toggle */
.funding-toggle-section {
    margin: 30px 0 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e6ed;
}

.funding-toggle-btn {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.funding-toggle-btn:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.funding-toggle-btn i.fa-rocket {
    margin-right: 10px;
    color: #3498db;
}

.funding-toggle-btn i.fa-chevron-down {
    transition: transform 0.3s ease;
}

.funding-toggle-btn.active i.fa-chevron-down {
    transform: rotate(180deg);
}

.funding-inputs {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 20px;
}

.funding-explainer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    background: #e7f3ff;
    border-left: 4px solid #3498db;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: #2c3e50;
}

.funding-explainer i {
    color: #3498db;
    margin-top: 2px;
}

/* Funding Results */
.funding-content {
    padding: 30px;
}

.funding-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.funding-stat-card {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 2px solid #e0e6ed;
}

.funding-stat-card h4 {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.funding-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.funding-stat-label {
    font-size: 0.85rem;
    color: #6c757d;
}

.milestone-badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 10px;
}

.input-card form {
    padding: 30px;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 30px;
}

.result-item {
    background: linear-gradient(135deg, #f8f9ff, #fff);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #3498db;
    position: relative;
    transition: transform 0.2s ease;
}

.result-item:hover {
    transform: translateY(-2px);
}

.result-item.goal { border-left-color: #e74c3c; }
.result-item.revenue { border-left-color: #27ae60; }
.result-item.users { border-left-color: #f39c12; }
.result-item.trials { border-left-color: #9b59b6; }
.result-item.budget { border-left-color: #e67e22; }
.result-item.timeline { border-left-color: #1abc9c; }

.result-item strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 8px;
}

.highlight {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    display: block;
    margin: 10px 0;
}

.result-item small {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ROI Timeline */
.timeline-content {
    padding: 30px;
}

.timeline-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f1f3f4;
    position: relative;
}

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

.timeline-month {
    background: #3498db;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 25px;
    flex-shrink: 0;
}

.timeline-month.break-even {
    background: #27ae60;
}

.timeline-month.profit {
    background: #f39c12;
}

.timeline-details h4 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.timeline-details p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Scenarios */
.scenarios-content {
    padding: 30px;
}

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

.scenario-card {
    background: linear-gradient(135deg, #f8f9ff, #fff);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.scenario-card.positive {
    border-color: #27ae60;
    background: linear-gradient(135deg, #f0fff4, #fff);
}

.scenario-card.negative {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5, #fff);
}

.scenario-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tips Section */
.tips-content {
    padding: 30px;
}

.tip-item {
    background: linear-gradient(135deg, #fff9e6, #fff);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #f39c12;
    margin-bottom: 15px;
}

.tip-item h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.export-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f99);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section {
    animation: slideInUp 0.6s ease;
}

.tips-section {
    animation: slideInUp 0.8s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-section h1 {
        font-size: 2rem;
    }
    
    .input-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .scenario-grid {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        padding: 20px;
    }
    
    .tooltip:hover::after {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        max-width: 90vw;
    }
}

@media (max-width: 480px) {
    .header-section h1 {
        font-size: 1.8rem;
    }
    
    .header-section .description {
        font-size: 1rem;
    }
    
    .timeline-item {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline-month {
        margin: 0 0 15px 0;
    }
}

/* Share Section */
.share-content {
    padding: 30px;
}

.share-url-section {
    margin-bottom: 30px;
}

.share-url-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.url-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.url-input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #f8f9fa;
    color: #495057;
}

.copy-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.share-buttons h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.share-btn {
    background: white;
    border: 2px solid #e0e6ed;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.share-btn.whatsapp {
    border-color: #25d366;
    color: #25d366;
}

.share-btn.whatsapp:hover {
    background: #25d366;
    color: white;
}

.share-btn.twitter {
    border-color: #1da1f2;
    color: #1da1f2;
}

.share-btn.twitter:hover {
    background: #1da1f2;
    color: white;
}

.share-btn.linkedin {
    border-color: #0077b5;
    color: #0077b5;
}

.share-btn.linkedin:hover {
    background: #0077b5;
    color: white;
}

.share-btn.email {
    border-color: #dc3545;
    color: #dc3545;
}

.share-btn.email:hover {
    background: #dc3545;
    color: white;
}

/* Footer Styles */
.footer {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-links .separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .export-btn, .share-section, .footer {
        display: none;
    }
}