/* thoughts/styles.css */

:root {
    /* Legacy Theme Compatibility Mapping */
    --accent-color: var(--accent-red);
    --secondary-color: var(--accent-blue);
    --light-gray: var(--text-secondary);
    --medium-gray: var(--text-muted);
    --white: var(--text-primary);
    --dark-bg: var(--bg-primary);
}

/* Override main title to be visible immediately in thought pages */
#main-title {
    opacity: 1 !important;
    font-size: 2rem !important;
    color: #FFFFFF !important;
}

/* Base Link Styles */
a.underline {
    color: var(--accent-red) !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(231, 76, 60, 0.4) !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

a.underline:hover {
    color: #FFFFFF !important;
    text-decoration-color: #FFFFFF !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Ensure body has proper background and text color */
body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

.container {
    width: 90%;
    max-width: 900px;
    margin: 3rem auto;
    padding: 3rem 2.5rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, rgba(26, 26, 26, 0.95) 100%);
    border-left: 8px solid var(--accent-red);
    border-right: 8px solid var(--accent-blue);
    border-top: 3px solid var(--accent-blue);
    border-bottom: 3px solid var(--accent-red);
    clip-path: polygon(
        0 0,
        calc(100% - 20px) 0,
        100% 20px,
        100% 100%,
        20px 100%,
        0 calc(100% - 20px)
    );
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.8),
        inset 0 0 60px rgba(30, 58, 138, 0.05),
        0 0 40px rgba(231, 76, 60, 0.1);
    color: var(--text-primary) !important;
    font-family: var(--font-body);
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: var(--accent-red);
    clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: var(--accent-red);
    clip-path: polygon(0 100%, 100% 100%, 0 0);
}

h1, h2, h3 {
    color: var(--accent-red) !important;
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    border-bottom: 2px solid var(--accent-red-dark);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    padding-left: 1rem;
    border-left: 4px solid var(--accent-blue);
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-blue-light) !important;
}

p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
    color: #C0C0C0 !important;
}

strong {
    color: #FFFFFF !important;
    font-weight: 700;
}

em {
    color: var(--accent-blue-light) !important;
    font-style: italic;
}

blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(10, 10, 10, 0.5);
    border-left: 4px solid var(--accent-red);
    border-right: 2px solid var(--accent-blue);
    font-family: var(--font-mono);
    font-style: italic;
    color: #C0C0C0 !important;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.epigraph {
    font-style: italic;
    color: #808080 !important;
    font-size: 0.95rem;
    margin: 2rem 0;
    padding: 1rem;
    border-left: 3px solid var(--accent-blue);
    background: rgba(30, 58, 138, 0.05);
}

.callout {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(30, 58, 138, 0.1) 100%);
    border: 2px solid var(--accent-red);
    padding: 1.5rem;
    margin: 2rem 0;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.callout p {
    margin: 0;
    color: #FFFFFF !important;
}

.kicker {
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFFFFF !important;
    margin: 2rem 0;
}

ul, ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    color: #C0C0C0 !important;
}

li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: #C0C0C0 !important;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 2rem 0;
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

thead tr {
    border-bottom: 2px solid var(--accent-red);
    background: rgba(231, 76, 60, 0.1);
}

th {
    border: 1px solid var(--accent-blue);
    padding: 12px;
    text-align: left;
    color: var(--accent-red) !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    border: 1px solid var(--accent-blue);
    padding: 10px;
    color: #C0C0C0 !important;
}

tbody tr:hover {
    background: rgba(30, 58, 138, 0.1);
}

figure {
    margin: 2rem 0;
    text-align: center;
}

figcaption {
    margin-top: 1rem;
    font-style: italic;
    color: #808080 !important;
    font-size: 0.9rem;
}

img {
    max-width: 100%;
    height: auto;
    border: 2px solid var(--accent-blue);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.envyofnone-img {
    display: block;
    margin: 2rem auto;
    max-width: 900px;
    border: 3px solid var(--accent-red);
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.3);
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 2rem 1.5rem;
        margin: 2rem auto;
    }
    
    h1 {
        margin-top: 1rem;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 1.5rem 1rem;
        margin: 1rem auto;
    }
}

/* Zoomable Images & Lightbox Modal */
.zoomable-image {
    cursor: zoom-in;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.zoomable-image:hover {
    transform: scale(1.02);
    border-color: var(--accent-red) !important;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4) !important;
}

/* Lightbox overlay */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border: 3px solid var(--accent-red);
    box-shadow: 0 0 50px rgba(231, 76, 60, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: zoom-out;
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #FFFFFF;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    user-select: none;
}

.lightbox-close:hover {
    color: var(--accent-red);
    transform: scale(1.1);
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    color: #C0C0C0;
    font-size: 1.1rem;
    font-family: var(--font-body);
    text-align: center;
    max-width: 80%;
}
