/* Variables */
:root {
    --bg-dark: #0a0a0a;
    --bg-card: rgba(20, 20, 25, 0.7);
    --primary-gold: #D4AF37;
    --primary-gold-hover: #b5952f;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

.text-gold {
    color: var(--primary-gold);
}

.text-gray {
    color: var(--text-gray);
}

.text-small {
    font-size: 0.8rem;
}

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

.mt-2 {
    margin-top: 10px;
}

.mb-2 {
    margin-bottom: 10px;
}

.block {
    display: block;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold), #F1C40F);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-gold);
    color: var(--primary-gold);
}

.btn-outline:hover {
    background: var(--primary-gold);
    color: #000;
}

.btn-danger-hover:hover {
    border-color: #ff4d4d;
    background: #ff4d4d;
    color: #fff;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-gray);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.gold-dot {
    color: var(--primary-gold);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a:not(.btn) {
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: 0.3s;
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.nav-profile-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-gold);
    margin-left: 10px;
}

.nav-profile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background: var(--text-white);
    margin: 5px;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    /* Offset for fixed nav */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1611974765270-ca1258634369?q=80&w=2664&auto=format&fit=crop') no-repeat center center/cover;
    opacity: 0.15;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
}

.subtitle {
    display: inline-block;
    color: var(--primary-gold);
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}

.hero-stats {
    display: flex;
    gap: 50px;
    border-top: 1px solid var(--glass-border);
    padding-top: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-gold);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* Profile Section */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.profile-card {
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-img-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--primary-gold);
    padding: 5px;
    margin-bottom: 20px;
    overflow: hidden;
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    background: #222;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-gray);
}

.profile-img-display {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 5px;
}

.role {
    color: var(--primary-gold);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.profile-info {
    width: 100%;
    text-align: left;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span i {
    margin-right: 10px;
    color: var(--primary-gold);
    width: 20px;
}

.profile-details {
    padding: 40px;
}

.profile-details h3 {
    font-family: var(--font-heading);
    margin-bottom: 20px;
    color: var(--primary-gold);
}

.profile-details p {
    margin-bottom: 20px;
    color: var(--text-gray);
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.skill-tag {
    padding: 8px 16px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--primary-gold);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-gold);
}

/* Strategy Section */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.strategy-card {
    padding: 30px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.strategy-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-gold);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
}

.strategy-card:hover .step-number {
    color: rgba(212, 175, 55, 0.2);
}

.card-icon {
    font-size: 2rem;
    color: var(--primary-gold);
}

.strategy-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
    font-size: 1.25rem;
}

.strategy-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.strategy-list {
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    padding-top: 15px;
}

.strategy-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.strategy-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-gold);
}

.strategy-card-wide {
    grid-column: 1 / -1;
}

.strategy-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Admin Dashboard & Upload Form */
.admin-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.admin-dashboard {
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid var(--primary-gold);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
}

.dashboard-header h3 {
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-tabs {
    display: flex;
    gap: 10px;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-gray);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-body);
}

.tab-btn.active,
.tab-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

.dashboard-tab-content {
    display: none;
}

.dashboard-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-grid-advanced {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.upload-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    transition: 0.3s;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.upload-zone.dragover {
    border-color: var(--primary-gold);
    background: rgba(212, 175, 55, 0.1);
}

.small-zone {
    min-height: 150px;
}

.preview-mini {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: #000;
}

.preview-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-white);
    font-family: var(--font-body);
}

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

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: 0.2s;
    margin: 0;
}

.star-rating input:checked~label,
.star-rating label:hover,
.star-rating label:hover~label {
    color: var(--primary-gold);
}

/* Library Layout */
.library-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 600px;
    overflow: hidden;
}

.library-sidebar {
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid var(--glass-border);
    padding: 20px;
}

.sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.folder-tree {
    padding-left: 0;
}

.folder-item {
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    color: var(--text-gray);
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.folder-item:hover,
.folder-item.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-gold);
}

.folder-group {
    margin-top: 15px;
}

.group-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-gray);
    margin-bottom: 10px;
    display: block;
    padding-left: 10px;
}

.folder-group ul {
    padding-left: 10px;
}

.library-content {
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
}

.library-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.active-path {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-white);
}

.library-filters {
    display: flex;
    gap: 10px;
}

.filter-select {
    padding: 8px 15px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    font-size: 0.9rem;
}

/* Analysis Grid & Cards */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.analysis-item {
    overflow: hidden;
    transition: 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(30, 30, 35, 0.6);
}

.analysis-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.analysis-img-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
    cursor: pointer;
}

.analysis-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.analysis-item:hover .analysis-img {
    transform: scale(1.1);
}

.outcome-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.outcome-win {
    background: #2ecc71;
    color: #000;
}

.outcome-loss {
    background: #e74c3c;
    color: #fff;
}

.outcome-be {
    background: #95a5a6;
    color: #fff;
}

.analysis-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

.analysis-tag {
    font-size: 0.7rem;
    color: var(--primary-gold);
    background: rgba(212, 175, 55, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.analysis-date {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.analysis-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

.analysis-meta-row {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 10px;
}

/* Trade Modal */
.modal-xl {
    max-width: 1000px;
    width: 95%;
    height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.trade-modal-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    height: 100%;
}

.trade-images {
    background: #000;
    position: relative;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--glass-border);
}

.image-toggle {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    padding: 5px;
    display: flex;
    gap: 5px;
}

.toggle-btn {
    background: rgba(0, 0, 0, 0.6);
    /* Semi-transparent background */
    border: 1px solid var(--glass-border);
    color: #ddd;
    padding: 10px 20px;
    /* Larger touch target */
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
}

.toggle-btn.active {
    background: var(--primary-gold);
    color: #000;
    border-color: var(--primary-gold);
}

.image-display-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-display-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.trade-details-panel {
    padding: 30px;
    overflow-y: auto;
    background: #1a1a1a;
}

.trade-details-panel h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.trade-meta-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    /* Increased gap */
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    /* Increased padding */
    border-radius: 12px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    /* Space-Between for Labels and Values */
    align-items: center;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* Slightly brighter border */
    padding-bottom: 12px;
}

.meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.meta-item .label {
    font-size: 0.85rem;
    /* Increased size */
    color: rgba(200, 200, 200, 0.8);
    /* Lighter gray for better contrast */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.meta-item .value {
    font-size: 1.1rem;
    /* Increased size */
    font-weight: 700;
    /* Bold */
    color: #fff;
    /* White */
    text-align: right;
}

.trade-notes-section h4 {
    color: var(--text-gray);
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.trade-notes-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 30px;
}

.trade-confidence {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.stars {
    color: var(--primary-gold);
}

/* Risk Section */
.risk-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.risk-rules,
.risk-chart {
    padding: 40px;
}

.risk-rules h3,
.risk-chart h3 {
    font-family: var(--font-heading);
    margin-bottom: 30px;
    text-align: center;
}

.rules-list li {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.rules-list li i {
    margin-right: 15px;
    font-size: 1.2rem;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Contact Section - Upgraded */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-card {
    padding: 25px;
    text-align: center;
    transition: 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-gold);
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-gold);
    margin-bottom: 15px;
}

.contact-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 10px;
}

.contact-card p {
    color: var(--text-gray);
    margin-bottom: 20px;
    font-size: 0.9rem;
    word-break: break-all;
}

.contact-form-wrapper {
    padding: 40px;
}

.contact-form-wrapper h3 {
    font-family: var(--font-heading);
    margin-bottom: 30px;
    color: var(--primary-gold);
}

.form-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

.form-feedback.success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.form-feedback.error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

/* Footer */
footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.modal.active {
    display: flex;
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    padding: 30px;
    position: relative;
    background: #1a1a1a;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-gray);
    z-index: 10;
}

.close-modal:hover {
    color: var(--text-white);
}

.modal h2 {
    font-family: var(--font-heading);
    margin-bottom: 20px;
    color: var(--primary-gold);
}

/* Editor Modal Styles */
.editor-container {
    width: 100%;
    height: 300px;
    background: #000;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
}

.editor-controls {
    padding: 10px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.control-group label {
    min-width: 80px;
    color: var(--text-gray);
}

input[type="range"] {
    flex-grow: 1;
    accent-color: var(--primary-gold);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 30px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .strategy-details-grid {
        grid-template-columns: 1fr;
    }

    .upload-grid-advanced {
        grid-template-columns: 1fr;
    }

    .library-container {
        grid-template-columns: 1fr;
    }

    .library-sidebar {
        display: none;
        /* Hide sidebar on mobile for now, or make it a dropdown */
    }

    .trade-modal-grid {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .trade-images {
        height: 300px;
    }

    .risk-content {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.95);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .profile-manager-grid {
        grid-template-columns: 1fr;
    }
}

/* 
==============================================
   LIBRARY REDESIGN STYLES (MATCHING SCREENSHOT)
==============================================
*/

/* Library Container & Sidebar Overrides */
.library-container {
    background: transparent;
    /* Remove old bg */
    border: none;
    gap: 30px;
}

.library-sidebar {
    background: transparent;
    border: none;
    padding: 0;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    color: #fff;
    border-bottom: 2px solid var(--primary-gold);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

.sidebar-menu-btn {
    width: 100%;
    text-align: left;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu-btn.active {
    background: var(--primary-gold);
    color: #000;
}

.folder-tree {
    margin-top: 20px;
}

.category-header {
    font-size: 0.8rem;
    color: var(--text-gray);
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.folder-item {
    padding: 10px 0;
    color: var(--text-gray);
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.folder-item:hover,
.folder-item.active {
    color: var(--text-white);
    background: transparent;
    /* Reset old hover */
}

.folder-item i {
    color: var(--text-gray);
    transition: 0.2s;
}

.folder-item:hover i,
.folder-item.active i {
    color: var(--primary-gold);
}

/* Main Content Area */
.library-content {
    background: transparent;
    padding: 0;
}

.library-toolbar {
    background: #111;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin-bottom: 30px;
}

/* NEW TRADE CARD DESIGN */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    /* Wider cards */
    gap: 25px;
}

.trade-card-new {
    background: #0f0f0f;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.trade-card-new:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Card Image Area */
.card-img-top {
    width: 100%;
    height: 200px;
    position: relative;
    background: #222;
    overflow: hidden;
}

.card-img-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.trade-card-new:hover .card-img-top img {
    transform: scale(1.05);
    /* Zoom effect */
}

/* Badges on Image */
.badge-outcome {
    position: absolute;
    top: clamp(8px, 2vw, 15px);
    right: clamp(8px, 2vw, 15px);
    padding: clamp(3px, 1vw, 6px) clamp(8px, 2vw, 14px);
    border-radius: 4px;
    font-size: clamp(0.6rem, 2vw, 0.85rem);
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    z-index: 2;
}

.badge-win {
    background-color: #00C853;
}

/* Green */
.badge-loss {
    background-color: #D50000;
}

/* Red */
.badge-be {
    background-color: #FFAB00;
    color: #000;
}

/* Amber */
.badge-pending {
    background-color: #aaa;
    color: #000;
}

.badge-instrument {
    position: absolute;
    bottom: clamp(8px, 2vw, 15px);
    left: clamp(8px, 2vw, 15px);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: clamp(3px, 0.8vw, 5px) clamp(6px, 1.5vw, 12px);
    border-radius: 4px;
    color: var(--primary-gold);
    font-size: clamp(0.6rem, 2vw, 0.85rem);
    font-weight: 600;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.card-date {
    position: absolute;
    bottom: 15px;
    right: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Card Body */
.card-body {
    padding: clamp(12px, 3vw, 20px);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: var(--font-heading);
    font-size: clamp(0.9rem, 2.5vw, 1.15rem);
    margin-bottom: clamp(4px, 1vw, 8px);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 15px);
    margin-bottom: clamp(8px, 2vw, 15px);
    font-size: clamp(0.7rem, 2vw, 0.85rem);
    color: var(--text-gray);
}

.card-meta i {
    color: var(--text-gray);
    margin-right: clamp(2px, 0.5vw, 5px);
}

.card-stars {
    color: var(--primary-gold);
    font-size: clamp(0.65rem, 1.8vw, 0.85rem);
}

/* Card Footer Actions */
.card-actions {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-details {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: clamp(4px, 1vw, 6px) clamp(10px, 2vw, 15px);
    border-radius: 20px;
    color: #fff;
    font-size: clamp(0.65rem, 2vw, 0.8rem);
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: clamp(3px, 0.5vw, 5px);
}

.btn-details:hover {
    background: #fff;
    color: #000;
}

.btn-delete {
    color: var(--text-gray);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: 0.2s;
}

.btn-delete:hover {
    color: #ff4444;
}

/* Placeholder for missing images */
.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    color: var(--text-gray);
    font-size: 2rem;
}

/* 
==============================================
   TRADE DETAIL MODAL REDESIGN
==============================================
*/

/* Modal Container Overrides */
.modal-content.modal-xl {
    background: #0a0a0a;
    border: 1px solid #333;
    width: 95%;
    max-width: 1000px;
    height: 80vh;
    /* Fixed height for consistent layout */
    padding: 0;
    overflow: hidden;
    display: flex;
    border-radius: 20px;
}

.trade-modal-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    height: 100%;
    width: 100%;
}

.close-modal-new {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    z-index: 20;
    transition: 0.2s;
}

.close-modal-new:hover {
    color: #fff;
}

/* Left Column: Images */
.trade-images-col {
    position: relative;
    background: #000;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid #222;
}

.trade-img-full {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-toggle-pill {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 30px;
    padding: 5px;
    display: flex;
    gap: 5px;
    border: 1px solid var(--glass-border);
}

.pill-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.pill-btn.active {
    background: var(--primary-gold);
    color: #000;
}

.pill-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Right Column: Details */
.trade-details-col {
    padding: 40px;
    overflow-y: auto;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
}

.detail-header {
    margin-bottom: 40px;
}

.detail-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-gold);
    line-height: 1.2;
    margin-bottom: 10px;
}

.detail-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

/* Data Grid */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-gray);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.detail-value {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

/* Notes Section */
.detail-notes {
    margin-top: auto;
    border-top: 1px solid #222;
    padding-top: 25px;
}

.notes-text {
    color: #ccc;
    font-size: clamp(0.75rem, 1.5vh, 0.95rem);
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE MODAL TEXT SIZING
   Adapts to viewport height for short/tall screens
============================================ */

/* Mobile and short screens */
@media (max-height: 700px) {
    .modal-content.modal-xl {
        height: 95vh;
    }

    .trade-details-col {
        padding: 20px;
    }

    .detail-header {
        margin-bottom: 20px;
    }

    .detail-title {
        font-size: clamp(1.1rem, 3vh, 1.6rem);
        margin-bottom: 6px;
    }

    .detail-grid {
        gap: 15px;
        margin-bottom: 20px;
    }

    .detail-label {
        font-size: clamp(0.6rem, 1.2vh, 0.8rem);
        margin-bottom: 4px;
    }

    .detail-value {
        font-size: clamp(0.9rem, 2vh, 1.2rem);
    }

    .detail-notes {
        padding-top: 15px;
    }

    .notes-text {
        font-size: clamp(0.7rem, 1.4vh, 0.9rem);
    }

    #modalOutcomeBadge {
        padding: 3px 10px !important;
        font-size: 0.7rem;
    }

    .pill-btn {
        padding: 4px 14px;
        font-size: 0.8rem;
    }
}

/* Very short screens (landscape mobile) */
@media (max-height: 500px) {
    .modal-content.modal-xl {
        height: 98vh;
    }

    .trade-details-col {
        padding: 15px;
    }

    .detail-header {
        margin-bottom: 15px;
    }

    .detail-title {
        font-size: clamp(0.95rem, 3.5vh, 1.3rem);
        line-height: 1.1;
    }

    .detail-grid {
        gap: 10px;
        margin-bottom: 15px;
    }

    .detail-label {
        font-size: 0.55rem;
        margin-bottom: 2px;
    }

    .detail-value {
        font-size: clamp(0.8rem, 2.5vh, 1rem);
    }

    .detail-notes {
        padding-top: 10px;
    }

    .notes-text {
        font-size: 0.7rem;
        line-height: 1.4;
    }

    .image-toggle-pill {
        top: 10px;
        padding: 3px;
    }

    .pill-btn {
        padding: 3px 10px;
        font-size: 0.75rem;
    }
}

/* Tall screens - larger text */
@media (min-height: 900px) {
    .detail-title {
        font-size: 2.2rem;
    }

    .detail-value {
        font-size: 1.4rem;
    }

    .detail-label {
        font-size: 0.9rem;
    }

    .notes-text {
        font-size: 1rem;
    }
}

/* Mobile width responsive modal */
@media (max-width: 768px) {
    .trade-modal-grid {
        grid-template-columns: 1fr;
        height: auto;
        max-height: 100%;
    }

    .trade-images-col {
        height: 35vh;
        min-height: 180px;
        max-height: 280px;
    }

    .trade-details-col {
        padding: 20px;
        max-height: 55vh;
        overflow-y: auto;
    }

    .detail-title {
        font-size: clamp(1.2rem, 4vw, 1.6rem);
    }

    .detail-grid {
        gap: 20px;
    }

    .detail-value {
        font-size: clamp(1rem, 3vw, 1.2rem);
    }

    .detail-label {
        font-size: clamp(0.65rem, 2vw, 0.8rem);
    }
}

/* Very small mobile screens */
@media (max-width: 480px) {
    .modal-content.modal-xl {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .trade-images-col {
        height: 30vh;
        min-height: 150px;
    }

    .trade-details-col {
        padding: 15px;
    }

    .detail-title {
        font-size: 1.1rem;
    }

    .detail-header {
        margin-bottom: 15px;
    }

    .detail-grid {
        gap: 12px;
        margin-bottom: 15px;
    }

    .detail-value {
        font-size: 1rem;
    }

    .detail-label {
        font-size: 0.6rem;
        letter-spacing: 0.5px;
    }

    .notes-text {
        font-size: 0.8rem;
    }

    #modalOutcomeBadge {
        padding: 3px 8px !important;
        font-size: 0.65rem;
    }
}