/* css/styles.css - Main stylesheet for the FYPM member portal (fuckyoupayme.info)
   Palette taken from the FYPM wallpaper: near-black, electric purple, gold, chart green. */

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

:root {
    /* Brand */
    --ink: #0b0910;              /* page background, near-black with a purple cast */
    --ink-2: #15101f;            /* header / nav surfaces */
    --purple: #7b2cbf;
    --purple-bright: #9d4edd;
    --purple-deep: #2a0f4a;
    --gold: #d4a537;
    --gold-bright: #f2c94c;
    --green: #39d353;

    /* Used throughout the content panel (light card) and the AJAX-loaded sections */
    --primary-color: var(--purple-deep);
    --secondary-color: var(--purple);
    --accent-color: var(--gold);
    --diamond-color: #c9b6ff;
    --crown-color: var(--gold-bright);
    --admin-color: #e5484d;
    --bg-color: #f4f1f8;
    --text-color: #2b2533;
    --border-color: #e2dcea;
    --shadow: 0 6px 24px rgba(0,0,0,0.35);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--ink);
    background-image:
        radial-gradient(1200px 600px at 85% -10%, rgba(123,44,191,0.25), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(212,165,55,0.12), transparent 60%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Brand mark (login box + header) */
.brand-mark {
    display: inline-block;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: var(--ink);
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.4;
}

/* ---------- Login / Register ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: #000;
    background-image:
        linear-gradient(90deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.35) 28%, rgba(0,0,0,0) 45%),
        url('../images/fypm-bg-1920.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 24px 16px;
    margin-left: 6vw;
}

.login-box {
    background: rgba(13, 8, 22, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(157, 78, 221, 0.35);
    border-top: 3px solid var(--gold);
    padding: 36px 36px 30px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 40px rgba(123,44,191,0.25);
    text-align: center;
    color: #eee8f5;
}

.login-box .brand-mark {
    margin-bottom: 14px;
}

.login-box h1 {
    color: #fff;
    margin-bottom: 4px;
    font-size: 1.7em;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.login-box h2 {
    color: var(--gold-bright);
    margin-bottom: 26px;
    font-size: 1em;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-box button {
    width: 100%;
    padding: 12px 20px;
    margin-top: 6px;
    background: linear-gradient(135deg, var(--purple-bright), var(--purple));
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: filter 0.2s, box-shadow 0.2s;
}

.login-box button:hover {
    filter: brightness(1.12);
    box-shadow: 0 0 18px rgba(157,78,221,0.55);
}

.error-message {
    color: #ff8a8a;
    margin-top: 15px;
    font-size: 14px;
}

.login-box .form-group {
    margin-bottom: 15px;
    text-align: left;
}

.login-box .form-group label {
    display: block;
    margin-bottom: 5px;
    color: #c9bfd8;
    font-size: 14px;
}

.login-box .form-group input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 0;
    background: rgba(255,255,255,0.06);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-box .form-group input::placeholder {
    color: rgba(255,255,255,0.4);
}

.login-box .form-group input:focus {
    outline: none;
    border-color: var(--purple-bright);
    box-shadow: 0 0 0 3px rgba(157,78,221,0.3);
}

.login-box .field-hint {
    font-size: 12px;
    color: #a99cbc;
    margin-top: 5px;
}

.login-box .login-box-intro {
    color: #c9bfd8;
    font-size: 14px;
    margin-bottom: 20px;
}

.login-box .error-message {
    margin: 0 0 15px;
    padding: 10px;
    background: rgba(229,72,77,0.12);
    border-radius: 6px;
}

.success-message {
    color: #7ee38f;
    margin-bottom: 15px;
    font-size: 14px;
    padding: 10px;
    background: rgba(57,211,83,0.12);
    border-radius: 6px;
}

.login-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #a99cbc;
}

.login-links a {
    color: var(--gold-bright);
    text-decoration: none;
    font-weight: 600;
}

.login-links a:hover {
    text-decoration: underline;
}

/* Contact page: login-style box with a select and a textarea */
.contact-container {
    max-width: 520px;
}

.login-box .form-group select,
.login-box .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
}

.login-box .form-group select option {
    background: #1a1326;
    color: #fff;
}

.login-box .form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.login-box .form-group select:focus,
.login-box .form-group textarea:focus {
    outline: none;
    border-color: var(--purple-bright);
    box-shadow: 0 0 0 3px rgba(157,78,221,0.3);
}

.login-help {
    margin-top: 10px;
    font-size: 13px;
}

/* Honeypot: off-screen for people, still in the form for bots */
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Portal Support tab */
.support-form {
    max-width: 720px;
}

.support-status {
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--bg-color);
    font-size: 14px;
}

.support-status.ok {
    color: #2e7d32;
    background: #e8f5e9;
}

/* ---------- Header ---------- */
.main-header {
    background: linear-gradient(90deg, #000 0%, var(--ink-2) 60%, #1d0f33 100%);
    color: white;
    padding: 14px 0;
    border-bottom: 1px solid rgba(212,165,55,0.35);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-content h1 {
    font-size: 1.35em;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-type {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.user-type.diamond {
    background: var(--diamond-color);
    color: var(--purple-deep);
}

.user-type.crown-jewel {
    background: var(--crown-color);
    color: var(--ink);
}

.user-type.admin {
    background: var(--admin-color);
    color: white;
}

.logout-btn {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 6px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
}

/* ---------- Navigation ---------- */
.main-nav {
    background: rgba(21,16,31,0.95);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(157,78,221,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav ul {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: #cfc6dc;
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(157,78,221,0.12);
    color: #fff;
}

.nav-link.active {
    color: var(--gold-bright);
    border-bottom-color: var(--gold);
}

/* Dropdown submenus: <li class="has-submenu"><a class="nav-link">..</a><ul class="submenu">..</ul></li>
   Opens on hover (mouse) and on focus (tap / keyboard). */
.has-submenu {
    position: relative;
}

.nav-caret {
    font-size: 11px;
    opacity: 0.7;
}

.main-nav .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    padding: 6px 0;
    margin: 0;
    flex-direction: column;
    background: #1a1326;
    border: 1px solid rgba(157,78,221,0.35);
    border-top: 2px solid var(--gold);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.5);
    z-index: 110;
}

.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu {
    display: flex;
}

.has-submenu.submenu-closed > .submenu {
    display: none;
}

.submenu .nav-link {
    padding: 10px 18px;
    border-bottom: none;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.submenu .nav-link.active {
    border-left-color: var(--gold);
    background: rgba(212,165,55,0.08);
}

/* ---------- Layout ---------- */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px);
}

.content-area {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--purple);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.section-intro {
    color: #5e5470;
    margin: -8px 0 20px;
}

/* ---------- Academy ---------- */
/* One column: each track is a full-width band, videos stacked inside it */
.academy-tracks {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.academy-track {
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--purple);
    border-radius: 10px;
    padding: 20px;
    background: var(--bg-color);
}

.academy-track:nth-child(even) {
    border-left-color: var(--gold);
}

.academy-video {
    max-width: 960px;
}

.academy-track h3 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.academy-video {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    margin-top: 14px;
}

.academy-video-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.academy-video h4 {
    color: var(--primary-color);
    font-size: 16px;
}

.academy-duration {
    color: #7a6f8c;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.academy-desc {
    color: #5e5470;
    font-size: 14px;
    margin-bottom: 10px;
}

.academy-video video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 6px;
}

.badge-muted {
    background: #e9e4f0;
    color: #5e5470;
    vertical-align: middle;
    margin-left: 6px;
}

/* ---------- Admin: Academy video manager ---------- */
.video-upload {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    max-width: 760px;
    margin-bottom: 30px;
}

.video-upload h3,
.video-list-heading {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1 1 220px;
}

.error-text {
    color: #c62828 !important;
}

.upload-progress {
    margin-top: 16px;
}

.upload-bar {
    height: 10px;
    background: #e2dcea;
    border-radius: 5px;
    overflow: hidden;
}

.upload-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--purple), var(--purple-bright));
    transition: width 0.3s;
}

.upload-status {
    font-size: 13px;
    color: #5e5470;
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
}

.upload-status.ok {
    color: #2e7d32;
}

.video-admin-track {
    color: var(--primary-color);
    margin: 20px 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-admin-track span {
    color: #7a6f8c;
    font-weight: normal;
    font-size: 14px;
}

.video-admin-none {
    color: #7a6f8c;
    font-size: 14px;
}

.video-admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    background: white;
}

.video-admin-title {
    font-weight: 600;
    color: var(--text-color);
}

.video-admin-meta {
    font-size: 13px;
    color: #7a6f8c;
}

.video-admin-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--secondary-color);
    border-radius: 6px;
    cursor: pointer;
}

.btn-icon:hover:not(:disabled) {
    background: var(--secondary-color);
    color: white;
}

.btn-icon:disabled {
    opacity: 0.35;
    cursor: default;
}

.btn-icon-danger {
    color: #c62828;
}

.btn-icon-text {
    width: auto;
    padding: 0 10px;
    font-size: 13px;
    white-space: nowrap;
}

/* ---------- Academy article (section without video) ---------- */
.academy-article {
    max-width: 860px;
    border-left: 4px solid var(--gold);
    background: var(--bg-color);
    border-radius: 10px;
    padding: 24px 28px;
}

.academy-article > h3 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4em;
}

.article-updated {
    font-size: 13px;
    color: #7a6f8c;
    margin: 2px 0 18px;
}

.article-body {
    line-height: 1.75;
    color: var(--text-color);
}

.article-body h4 {
    color: var(--primary-color);
    font-size: 1.15em;
    margin: 26px 0 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--border-color);
}

.article-body h4:first-child {
    margin-top: 0;
}

.article-body p {
    margin: 0 0 14px;
}

.article-body ul {
    margin: 0 0 16px 22px;
}

.article-body li {
    margin-bottom: 4px;
}

.article-body a {
    color: var(--secondary-color);
    word-break: break-word;
}

.article-body a.article-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    margin: 4px 0 18px;
    background: linear-gradient(135deg, var(--purple-bright), var(--purple));
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.article-body a.article-button:hover {
    filter: brightness(1.1);
}

.article-callout {
    background: #fff8e1;
    border-left: 4px solid var(--gold);
    border-radius: 6px;
    padding: 14px 18px;
    margin: 0 0 16px;
}

.article-callout p:last-child {
    margin-bottom: 0;
}

textarea.article-editor {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

/* ---------- Lesson materials ---------- */
.academy-desc a {
    color: var(--secondary-color);
    word-break: break-all;
}

.lesson-materials {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.lesson-materials-title {
    width: 100%;
    font-size: 13px;
    font-weight: 600;
    color: #5e5470;
}

.material-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.material-link:hover {
    background: #e9e1f5;
}

.material-link .fa-file-pdf {
    color: #c62828;
}

.material-link small {
    color: #7a6f8c;
}

.academy-admin {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    display: flex;
    gap: 16px;
}

.academy-video-focus {
    box-shadow: 0 0 0 3px var(--gold);
    transition: box-shadow 0.4s;
}

.academy-video {
    scroll-margin-top: 70px;   /* clear the sticky nav when scrolled to */
}

.materials-lesson {
    margin-bottom: 16px;
}

.materials-lesson-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.materials-lesson-track {
    font-size: 12px;
    color: #7a6f8c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.materials-lesson-head .section-link {
    margin-left: auto;
    color: var(--secondary-color);
    font-size: 14px;
    text-decoration: none;
}

.materials-lesson-head .section-link:hover {
    text-decoration: underline;
}

.materials-admin-list {
    margin-bottom: 20px;
}

.materials-upload {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.btn-icon-danger:hover:not(:disabled) {
    background: #c62828;
}

.academy-track > p {
    color: #5e5470;
    margin-bottom: 10px;
}

.empty-state.small {
    padding: 24px 10px;
}

.empty-state.small i {
    font-size: 32px;
    margin-bottom: 8px;
    color: #c8bdd8;
}

/* ---------- Login responsive ---------- */
@media (max-width: 900px) {
    .login-page {
        justify-content: center;
        background-image:
            linear-gradient(0deg, rgba(0,0,0,0.7), rgba(0,0,0,0.45)),
            url('../images/fypm-bg-1920.jpg');
        background-position: 45% center;
    }
    .login-container {
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .login-page {
        background-image:
            linear-gradient(0deg, rgba(0,0,0,0.7), rgba(0,0,0,0.45)),
            url('../images/fypm-bg-960.jpg');
    }
}

/* Updates page */
#updates > .btn-primary {
    margin-bottom: 20px;
}

.update-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.update-date {
    color: #666;
    font-size: 13px;
    font-weight: 600;
}

.update-actions {
    display: flex;
    gap: 12px;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--secondary-color);
    font-size: 13px;
    cursor: pointer;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-delete-update {
    color: #d32f2f;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

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

.btn-secondary {
    background: white;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: white;
}

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

.admin-card {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.admin-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.admin-card p {
    margin-bottom: 15px;
    color: #666;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Footer */
.main-footer {
    background: #000;
    color: #a99cbc;
    border-top: 1px solid rgba(212,165,55,0.3);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo-section {
        flex-direction: column;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        padding: 0;
    }
    
    .nav-link {
        flex: 1 1 50%;
        justify-content: center;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .nav-link {
        flex: 1 1 100%;
        padding: 12px;
    }
    
    .content-area {
        padding: 20px;
    }
}

/* Add these styles to the existing css/styles.css file */

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: white;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3em;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
}

.modal.modal-wide {
    max-width: 1000px;
}

/* Manage Users table */
.users-table-wrap {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.users-table th,
.users-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    white-space: nowrap;
}

.users-table th {
    background: #f5f5f5;
}

.users-table select.form-control {
    width: auto;
    padding: 4px 8px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
}

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

select.form-control {
    cursor: pointer;
}

input[type="file"].form-control {
    padding: 8px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    max-width: 350px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #4caf50;
    color: white;
}

.notification-error {
    background: #f44336;
    color: white;
}

.notification-info {
    background: var(--secondary-color);
    color: white;
}

/* Manual Content Styles */
.manual-section {
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.manual-section h3 {
    background: var(--bg-color);
    padding: 15px 20px;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
    user-select: none;
}

.manual-section h3:hover {
    background: #e8e8e8;
}

.manual-section h3::after {
    content: '▼';
    font-size: 12px;
    transition: transform 0.3s;
}

.manual-section h3.collapsed::after {
    transform: rotate(-90deg);
}

.manual-section-content {
    padding: 20px;
    background: white;
}

.manual-section h4 {
    color: var(--secondary-color);
    margin-top: 20px;
    margin-bottom: 10px;
}

.manual-section code {
    background: var(--bg-color);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.manual-section pre {
    background: #f8f8f8;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
}

/* Downloads Section Styles */
.downloads-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.download-category {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.download-category h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 5px;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.download-item:hover {
    background: #e8e8e8;
}

.download-info {
    flex: 1;
}

.download-info h4 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
    font-size: 16px;
}

.download-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.download-link {
    background: var(--secondary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
}

.download-link:hover {
    background: var(--primary-color);
}

/* Blog Post Styles */
.blog-posts {
    margin-top: 20px;
}

.blog-post {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: white;
}

.blog-post h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.blog-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.blog-content {
    line-height: 1.8;
    color: var(--text-color);
}

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

/* Access Restricted Message */
.access-restricted {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px 20px;
    border-radius: 5px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.access-restricted i {
    font-size: 20px;
}

/* Responsive Modal */
@media (max-width: 600px) {
    .modal {
        max-width: 100%;
        margin: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

/* Loading Spinner */
.loading {
    position: relative;
    color: #999;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: 10px auto;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s linear infinite;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes spin {
    to { transform: translateX(-50%) rotate(360deg); }
}

/* Error Message */
.error {
    color: #d32f2f;
    text-align: center;
    padding: 20px;
}

/* Success Message */
.success {
    color: #388e3c;
    text-align: center;
    padding: 20px;
}
/* Version styles */
.download-item.current-version {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #4caf50;
    color: white;
}

.crown-badge {
    color: var(--crown-color);
    font-size: 14px;
    font-weight: normal;
    margin-left: 10px;
}

.version-history {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.version-history h4 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.version-item {
    background: white;
    margin-bottom: 12px;
}

.release-notes-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.release-notes-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.release-notes {
    margin: 15px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 5px;
    border-left: 4px solid var(--secondary-color);
}

.release-notes h5 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 16px;
}

.release-notes pre {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    max-height: 300px;
    overflow-y: auto;
    margin: 0;
}

/* Update widget styling */
.update-item {
    margin-bottom: 20px;
}

.update-message {
    line-height: 1.6;
}

.update-message p {
    margin: 10px 0;
}

.update-message ol,
.update-message ul {
    margin: 15px 0;
    padding-left: 25px;
}

.update-message li {
    margin-bottom: 8px;
}

.update-message strong {
    display: block;
    margin-bottom: 10px;
    color: var(--primary-color);
}
