/* Color Palette - Orange & Cream Minimalist */
:root {
    --primary-orange: #FF8C42;
    --dark-orange: #E67326;
    --light-orange: #FFB381;
    --cream: #FFF8F0;
    --cream-dark: #F5E6D3;
    --text-dark: #2C1810;
    --text-light: #6B4423;
    --border: #E8D4B8;
    --shadow: rgba(230, 115, 38, 0.1);
}

/* Dark Theme Variables */
.dark-theme {
    --cream: #2C1810;
    --cream-dark: #3D2415;
    --text-dark: #FFF8F0;
    --text-light: #E8D4B8;
    --border: #6B4423;
    --shadow: rgba(255, 140, 66, 0.2);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--cream);
    color: var(--text-dark);
    overflow: hidden;
    transition: background-color 0.3s ease;
}

/* Container */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 100vw;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-orange), var(--dark-orange));
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px var(--shadow);
}

.header h1 {
    color: var(--cream);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.search-container {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
}

/* Tab Navigation */
.tab-nav {
    background: var(--cream-dark);
    padding: 0.5rem 2rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-orange) var(--cream-dark);
}

.tab-nav::-webkit-scrollbar {
    height: 4px;
}

.tab-nav::-webkit-scrollbar-track {
    background: var(--cream-dark);
}

.tab-nav::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 4px;
}

.tab-button {
    padding: 0.8rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.tab-button:hover {
    background: var(--cream);
    color: var(--primary-orange);
}

.tab-button.active {
    background: var(--cream);
    color: var(--primary-orange);
    font-weight: 600;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-orange);
}

.tab-button.hidden {
    display: none;
}

/* Main Content */
.content {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--cream);
}

.tab-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.tab-content.active {
    opacity: 1;
    visibility: visible;
}

.iframe-content {
    width: 100%;
    height: 100%;
    border: none;
}

/* External Link Cards */
.external-link-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
}

.external-link-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px var(--shadow);
    text-align: center;
    max-width: 500px;
    border: 2px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.external-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px var(--shadow);
}

.external-link-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.external-link-card h2 {
    color: var(--primary-orange);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.external-link-card p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-open-external {
    padding: 1rem 2.5rem;
    background: var(--primary-orange);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-open-external:hover {
    background: var(--dark-orange);
    transform: scale(1.05);
    box-shadow: 0 4px 16px var(--shadow);
}

.external-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--cream);
    border-radius: 8px;
}

.external-note small {
    color: var(--text-light);
    font-size: 0.9rem;
}

.iframe-error {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
}

/* Popup Notification */
.popup-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    background: var(--primary-orange);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    z-index: 9999;
    transition: right 0.3s ease;
}

.popup-notification.show {
    right: 20px;
}

/* Notes & Tasks Section */
.notes-container {
    padding: 2rem;
    height: 100%;
    overflow-y: auto;
    background: var(--cream);
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.notes-header h2 {
    color: var(--primary-orange);
    font-size: 1.5rem;
}

.btn-add {
    padding: 0.7rem 1.5rem;
    background: var(--primary-orange);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background: var(--dark-orange);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow);
}

.notes-list {
    display: grid;
    gap: 1rem;
}

.note-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-orange);
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.2s ease;
}

.note-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px var(--shadow);
}

.note-item.completed {
    opacity: 0.6;
    border-left-color: var(--text-light);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.note-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.note-actions {
    display: flex;
    gap: 0.5rem;
}

.note-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.note-btn:hover {
    transform: scale(1.2);
}

.note-content {
    color: var(--text-light);
    line-height: 1.6;
    margin-top: 0.5rem;
}

.note-time {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--cream-dark);
    padding: 0.8rem 2rem;
    border-top: 1px solid var(--border);
}

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

.quick-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.quick-btn:hover {
    background: var(--primary-orange);
    color: white;
    border-color: var(--primary-orange);
}

.footer-info {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Modal for Adding Notes */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--cream);
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: var(--primary-orange);
    font-size: 1.3rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    color: var(--text-dark);
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-cancel,
.btn-save {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: var(--cream-dark);
    color: var(--text-dark);
}

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

.btn-save {
    background: var(--primary-orange);
    color: white;
}

.btn-save:hover {
    background: var(--dark-orange);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .search-container {
        width: 100%;
    }

    .tab-nav {
        padding: 0.5rem 1rem;
    }

    .tab-button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .notes-container {
        padding: 1rem;
    }

    .footer {
        padding: 0.6rem 1rem;
    }

    .quick-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .footer-info {
        text-align: center;
    }
}
