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

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

/* App Container */
.app-container {
    max-width: 428px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #2196F3 0%, #21CBF3 100%);
    color: white;
    padding: 20px 20px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.app-title {
    font-size: 24px;
    font-weight: 600;
}

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

.current-time {
    font-size: 14px;
    opacity: 0.9;
}

.settings-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* Timer Section */
.timer-section {
    padding: 15px 20px;
    background: #f8f9fa;
}

.timer-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    border: 2px solid #e3f2fd;
}

.timer-label {
    font-size: 14px;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.timer-display {
    font-size: 20px;
    font-weight: bold;
    color: #2196F3;
}

/* Categories Grid */
.categories-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.category-card {
    background: white;
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--category-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover::before,
.category-card.has-idea::before {
    transform: scaleX(1);
}

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

.category-card.has-idea {
    border-color: var(--category-color);
    background: linear-gradient(135deg, white 0%, var(--category-light) 100%);
}

.category-icon {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.category-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.status-available {
    background: #e8f5e8;
    color: #2e7d2e;
}

.status-waiting {
    background: #fff3e0;
    color: #f57c00;
}

/* Category Colors */
.category-card[data-category="online-business"] { --category-color: #FF6B6B; --category-light: #ffe8e8; }
.category-card[data-category="offline-business"] { --category-color: #4ECDC4; --category-light: #e8fffe; }
.category-card[data-category="mobile-app"] { --category-color: #45B7D1; --category-light: #e8f4fd; }
.category-card[data-category="website"] { --category-color: #96CEB4; --category-light: #f0faf5; }
.category-card[data-category="saas"] { --category-color: #FFEAA7; --category-light: #fffdf0; }
.category-card[data-category="side-hustle"] { --category-color: #DDA0DD; --category-light: #f8f0f8; }
.category-card[data-category="marketing"] { --category-color: #98D8C8; --category-light: #f0fcf9; }
.category-card[data-category="ecommerce"] { --category-color: #F7DC6F; --category-light: #fefcf0; }
.category-card[data-category="social-media"] { --category-color: #BB8FCE; --category-light: #f5f0f8; }
.category-card[data-category="passive-income"] { --category-color: #82E0AA; --category-light: #f0fdf4; }

/* Modal */
.idea-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.idea-modal.show {
    display: flex;
    opacity: 1;
    align-items: flex-end;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 428px;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.idea-modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    background: #2196F3;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.action-btn:hover {
    background: rgba(255,255,255,0.3);
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
    line-height: 1.6;
}

.idea-title {
    font-size: 20px;
    font-weight: bold;
    color: #2196F3;
    margin-bottom: 15px;
}

.idea-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    border-left: 4px solid #2196F3;
    padding-left: 10px;
}

.section-content {
    color: #555;
    font-size: 14px;
}

.section-content ul {
    padding-left: 20px;
    margin-top: 5px;
}

.section-content li {
    margin-bottom: 5px;
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}

.settings-panel.show {
    display: flex;
}

.settings-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 300px;
    text-align: center;
}

.settings-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px 0;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.close-settings {
    background: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    font-size: 14px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 2000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e3f2fd;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Responsive Design */
@media (max-width: 480px) {
    .app-container {
        margin: 0;
        border-radius: 0;
    }
    
    .categories-grid {
        padding: 15px;
        gap: 12px;
    }
    
    .category-card {
        padding: 15px 10px;
    }
    
    .category-icon {
        font-size: 30px;
    }
    
    .category-name {
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .category-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 15px;
    }
    
    .category-icon {
        margin-right: 15px;
        margin-bottom: 0;
    }
    
    .category-info {
        flex: 1;
    }
}

/* Dark Mode */
.dark-mode {
    background: #121212;
    color: #fff;
}

.dark-mode .app-container {
    background: #1e1e1e;
}

.dark-mode .categories-grid {
    background: #1e1e1e;
}

.dark-mode .category-card {
    background: #2d2d2d;
    color: #fff;
}

.dark-mode .timer-card {
    background: #2d2d2d;
    color: #fff;
    border-color: #444;
}

/* PWA Styles */
@media (display-mode: standalone) {
    .app-header {
        padding-top: 30px;
    }
}
/* In-App Notifications */
.in-app-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid #2196F3;
}

.in-app-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.in-app-notification.notification-success {
    border-left-color: #4CAF50;
}

.in-app-notification.notification-warning {
    border-left-color: #FF9800;
}

.in-app-notification.notification-error {
    border-left-color: #F44336;
}

.notification-content {
    padding: 16px 20px;
}

.notification-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.notification-icon {
    font-size: 18px;
    margin-right: 10px;
}

.notification-title {
    font-weight: 600;
    color: #333;
    flex: 1;
    font-size: 16px;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: #f5f5f5;
    color: #666;
}

.notification-message {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* Dark mode notifications */
.dark-mode .in-app-notification {
    background: #2d2d2d;
    color: #fff;
}

.dark-mode .notification-title {
    color: #fff;
}

.dark-mode .notification-message {
    color: #ccc;
}

.dark-mode .notification-close:hover {
    background: #404040;
    color: #fff;
}
/* Dark mode category name fix */
.dark-mode .category-name {
    color: #4CAF50 !important;
    font-weight: 600;
}

.dark-mode .category-status {
    color: #ccc;
}

.dark-mode .status-available {
    background: #1b5e20;
    color: #4CAF50;
}

.dark-mode .status-waiting {
    background: #bf360c;
    color: #ff8a65;
}
/* Enhanced Idea Modal Formatting */
.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
    line-height: 1.6;
}

.idea-title {
    font-size: 22px;
    font-weight: bold;
    color: #2196F3;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3f2fd;
}

.idea-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    border-left: 4px solid #2196F3;
    padding-left: 12px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
}

.section-content {
    color: #555;
    font-size: 14px;
    white-space: pre-line; /* Preserves line breaks and paragraphs */
    margin-left: 16px;
}

.section-content strong {
    color: #2196F3;
    font-weight: 600;
}

.section-content ul, .section-content ol {
    margin: 10px 0;
    padding-left: 20px;
}

.section-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Dark mode adjustments */
.dark-mode .section-title {
    color: #4CAF50;
    background: #2d2d2d;
    border-left-color: #4CAF50;
}

.dark-mode .section-content {
    color: #ccc;
}

.dark-mode .section-content strong {
    color: #4CAF50;
}
/* BETTER CONTENT FORMATTING */
.section-content {
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    margin-left: 16px;
    white-space: pre-line; /* Preserves line breaks */
}

.section-content p {
    margin-bottom: 15px;
}

/* Format bullet points better */
.section-content:contains("•") {
    padding-left: 10px;
}

/* Make steps more readable */
.section-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Better paragraph spacing */
.section-content br {
    margin-bottom: 10px;
}

/* Dark mode content */
.dark-mode .section-content {
    color: #ddd;
}

