/* ========================================
   CODE FOR CREATIVES COHORT PORTAL
   Windows 95 Aesthetic
   ======================================== */

/* Base */
body {
    background-color: #008080;
    font-family: "MS Sans Serif", "Segoe UI", Tahoma, sans-serif;
    margin: 0;
    padding: 20px;
}

/* Main window */
.window {
    max-width: 900px;
    margin: 0 auto;
    background: #c0c0c0;
    border: 2px outset #ffffff;
    box-shadow: 2px 2px 0 #000;
}

.window-titlebar {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: #fff;
    padding: 4px 6px;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.window-titlebar .title-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.window-body {
    padding: 8px;
}

/* Title bar buttons */
.titlebar-buttons {
    display: flex;
    gap: 2px;
}

.titlebar-btn {
    background: #c0c0c0;
    border: 2px outset #fff;
    width: 18px;
    height: 18px;
    font-size: 10px;
    line-height: 14px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    font-family: "MS Sans Serif", Arial, sans-serif;
}

.titlebar-btn:active {
    border: 2px inset #808080;
}

/* ---- Auth Section ---- */
#auth-section {
    background: #c0c0c0;
    padding: 0;
}

.auth-window {
    max-width: 380px;
    margin: 40px auto;
    background: #c0c0c0;
    border: 2px outset #fff;
    box-shadow: 2px 2px 0 #000;
}

.auth-window .window-body {
    padding: 16px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: -2px;
    position: relative;
    z-index: 1;
}

.auth-tab {
    background: #c0c0c0;
    border: 2px outset #fff;
    border-bottom: none;
    padding: 6px 16px;
    cursor: pointer;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 12px;
}

.auth-tab.active {
    background: #fff;
    border-bottom: 2px solid #fff;
    position: relative;
    z-index: 2;
}

.auth-tab-content {
    background: #fff;
    border: 2px inset #808080;
    padding: 16px;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #fff;
    border: 2px outset #fff;
    padding: 8px;
    cursor: pointer;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 12px;
    margin-bottom: 12px;
}

.google-btn:active {
    border: 2px inset #808080;
}

.google-btn img {
    width: 18px;
    height: 18px;
}

.divider {
    text-align: center;
    margin: 12px 0;
    font-size: 11px;
    color: #808080;
    position: relative;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #808080;
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* ---- Portal Nav (Taskbar style) ---- */
.portal-nav {
    background: #c0c0c0;
    border-bottom: 2px groove #808080;
    padding: 4px 4px 0 4px;
    display: flex;
    gap: 2px;
}

.nav-tab {
    background: #c0c0c0;
    border: 2px outset #fff;
    border-bottom: none;
    padding: 6px 14px;
    cursor: pointer;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 12px;
    white-space: nowrap;
}

.nav-tab:hover {
    background: #d4d4d4;
}

.nav-tab.active {
    background: #fff;
    border: 2px outset #fff;
    border-bottom: 2px solid #fff;
    font-weight: bold;
}

/* ---- Status bar ---- */
.status-bar {
    background: #c0c0c0;
    border-top: 2px groove #808080;
    padding: 4px 8px;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-bar .user-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---- Page sections ---- */
.page-section {
    display: none;
    background: #fff;
    border: 2px inset #808080;
    padding: 16px;
    min-height: 400px;
}

.page-section.active {
    display: block;
}

/* ---- Shared form elements ---- */
.form-group {
    margin-bottom: 12px;
}

label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-family: "MS Sans Serif", Arial, sans-serif;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea {
    border: 2px inset #808080;
    background: #fff;
    padding: 4px 6px;
    font-family: "MS Sans Serif", Tahoma, sans-serif;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

.btn {
    background: #c0c0c0;
    border: 2px outset #fff;
    padding: 4px 16px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 12px;
    cursor: pointer;
}

.btn:active {
    border: 2px inset #808080;
}

.btn:disabled {
    color: #808080;
    cursor: default;
}

.btn-primary {
    background: #000080;
    color: #fff;
    border: 2px outset #4040c0;
}

.btn-primary:active {
    border: 2px inset #000040;
}

/* ---- Headings ---- */
h2.section-title {
    color: #000080;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 14px;
    margin: 0 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 2px groove #808080;
}

/* ---- Forum styles ---- */
.post {
    background: #f0f0f0;
    border: 2px groove #808080;
    padding: 12px;
    margin-bottom: 12px;
}

.post-header {
    border-bottom: 1px solid #808080;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.post-title {
    color: #800000;
    font-size: 13px;
    font-weight: bold;
    margin: 0;
    font-family: "MS Sans Serif", Arial, sans-serif;
}

.post-meta {
    font-size: 11px;
    color: #666;
    font-style: italic;
    margin: 4px 0 0 0;
}

.post-body {
    white-space: pre-wrap;
    font-family: "Courier New", monospace;
    font-size: 12px;
}

.reply-toggle {
    color: #0000ff;
    cursor: pointer;
    font-size: 11px;
    margin-top: 8px;
    font-family: "MS Sans Serif", Arial, sans-serif;
}

.reply-toggle:hover {
    text-decoration: underline;
}

.reply-form {
    margin-top: 8px;
    padding: 8px;
    background: #e8e8e8;
    border: 1px inset #808080;
}

.reply-form textarea {
    width: 100%;
    min-height: 50px;
    margin-bottom: 6px;
}

.replies {
    margin-top: 10px;
    margin-left: 16px;
    border-left: 2px solid #c0c0c0;
    padding-left: 12px;
}

.reply {
    margin-bottom: 8px;
    padding: 6px;
    background: #f8f8f8;
}

.reply-meta {
    font-size: 10px;
    color: #666;
    margin: 0 0 4px 0;
}

.reply-body {
    margin: 0;
    font-size: 12px;
}

/* New post form */
.new-post-form {
    background: #e8e8e8;
    border: 2px groove #808080;
    padding: 12px;
    margin-bottom: 16px;
}

/* ---- Notes styles ---- */
.notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notes-list li {
    padding: 8px 12px;
    border-bottom: 1px solid #c0c0c0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 12px;
}

.notes-list li:hover {
    background: #000080;
    color: #fff;
}

.notes-list li .note-date {
    font-size: 10px;
    color: #808080;
}

.notes-list li:hover .note-date {
    color: #c0c0ff;
}

/* Notes modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-window {
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: #c0c0c0;
    border: 2px outset #fff;
    box-shadow: 4px 4px 0 #000;
    display: flex;
    flex-direction: column;
}

.modal-window .window-titlebar {
    flex-shrink: 0;
}

.modal-window .window-body {
    flex: 1;
    overflow: auto;
    padding: 0;
}

.modal-window iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: none;
    background: #fff;
}

/* ---- Experiments styles ---- */
.experiments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.experiment-card {
    background: #f0f0f0;
    border: 2px groove #808080;
    padding: 12px;
}

.experiment-card h3 {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #000080;
    font-family: "MS Sans Serif", Arial, sans-serif;
}

.experiment-card .experiment-meta {
    font-size: 10px;
    color: #808080;
    margin-bottom: 6px;
}

.experiment-card p {
    font-size: 12px;
    margin: 0 0 8px 0;
}

.experiment-card a {
    color: #0000ff;
    font-size: 12px;
}

.experiment-card a:visited {
    color: #800080;
}

.experiment-form {
    background: #e8e8e8;
    border: 2px groove #808080;
    padding: 12px;
    margin-bottom: 16px;
}

/* ---- Resources styles ---- */
.resource-group {
    margin-bottom: 16px;
}

.resource-group h3 {
    font-size: 13px;
    color: #800000;
    font-family: "MS Sans Serif", Arial, sans-serif;
    margin: 0 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #c0c0c0;
}

.resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resource-list li {
    padding: 4px 0;
    font-size: 12px;
    font-family: "MS Sans Serif", Arial, sans-serif;
}

.resource-list li a {
    color: #0000ff;
}

.resource-list li a:visited {
    color: #800080;
}

.resource-list li .resource-desc {
    color: #666;
    font-size: 11px;
}

/* ---- Utility ---- */
.hidden {
    display: none !important;
}

.error {
    color: #ff0000;
    font-weight: bold;
    font-size: 12px;
}

.success {
    color: #008000;
    font-weight: bold;
    font-size: 12px;
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.empty-state {
    text-align: center;
    color: #808080;
    padding: 40px 20px;
    font-size: 12px;
    font-family: "MS Sans Serif", Arial, sans-serif;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    body {
        padding: 8px;
    }

    .portal-nav {
        flex-wrap: wrap;
    }

    .nav-tab {
        padding: 4px 10px;
        font-size: 11px;
    }

    .experiments-grid {
        grid-template-columns: 1fr;
    }

    .modal-window {
        width: 98%;
    }
}
