/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #e0c3fc 0%, #f5e6d3 100%);
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #4a5568;
    min-height: 100vh;
    padding: 20px;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
    color: #fff;
    text-align: center;
    background: rgba(139, 92, 246, 0.25);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    margin: 0 0 2rem 0;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.4);
    font-weight: 500;
    letter-spacing: -0.3px;
}

h2 {
    font-size: 1.35rem;
    margin: 1rem 0;
    color: #6b46c1;
    font-weight: 600;
}

/* ==================== LINKS ==================== */
a {
    font-family: inherit;
    text-decoration: none;
    color: #8b5cf6;
    transition: all 0.25s ease;
    font-weight: 500;
}

a:hover {
    color: #6b46c1;
}

a:visited {
    color: #9b7bdf;
}

/* ==================== MAIN CONTAINER ==================== */
table[width="90%"] {
    width: 100% !important;
    max-width: 1400px;
    margin: 0 auto;
    display: block;
}

/* ==================== CARDS & GALLERY ITEMS ==================== */
/* Gallery tables */
table:not([width="90%"]) {
    width: 100%;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border-collapse: separate;
    border-spacing: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.5);
}

table:not([width="90%"]):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.95);
}

td[bgcolor="#00FFFF"] {
    background: linear-gradient(135deg, #c4b5fd 0%, #ddd6fe 100%) !important;
    color: #4c1d95;
    padding: 12px 20px;
    font-weight: 600;
    border: none;
    font-size: 0.95rem;
    letter-spacing: -0.2px;
}

td[bgcolor="#00FFFF"] a {
    color: #4c1d95 !important;
    display: inline-block;
    word-break: break-all;
    font-weight: 600;
}

td[bgcolor="#00FFFF"] a:hover {
    color: #6d28d9 !important;
    transform: none;
}

/* Gallery rows */
tr[bgcolor="#F5F5F5"] {
    background: transparent !important;
    transition: all 0.25s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

tr[bgcolor="#F5F5F5"]:hover {
    background: rgba(255,255,255,0.5) !important;
}

td[width="34%"] {
    padding: 12px 20px;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 400;
}

/* Gallery links inside cells */
td[colspan="5"] {
    padding: 12px 20px;
}

td[colspan="5"] a {
    color: #8b5cf6;
    font-size: 0.9rem;
    word-break: break-all;
    font-weight: 500;
}

td[colspan="5"] a:hover {
    color: #6b46c1;
}

/* ==================== LISTS ==================== */
ul, .clean-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

ul li, .clean-list li {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(4px);
    padding: 1rem 1.25rem;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.6);
}

ul li:hover, .clean-list li:hover {
    background: rgba(255,255,255,0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: rgba(139, 92, 246, 0.3);
}

ul li a, .clean-list li a {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
}

/* ==================== PARAGRAPHS & DESCRIPTIONS ==================== */
p {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    margin: 1.25rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    color: #4a5568;
    line-height: 1.7;
    border: 1px solid rgba(255,255,255,0.5);
    transition: all 0.3s ease;
}

p:hover {
    background: rgba(255,255,255,0.95);
    transform: translateY(-1px);
}

p[style*="color: #fff;"],
p[style*="color: #fff"] {
    background: rgba(108, 76, 184, 0.6);
    backdrop-filter: blur(12px);
    color: #fef9c3 !important;
    border: 1px solid rgba(255,255,255,0.3);
}

p[style*="color: #fff;"] a,
p[style*="color: #fff"] a {
    color: #fef9c3 !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

p[style*="color: #fff;"] a:hover,
p[style*="color: #fff"] a:hover {
    color: #ffffff !important;
}

p[style*="color: black"] {
    background: rgba(255,255,255,0.9);
    color: #4a5568 !important;
}

/* ==================== IMAGES ==================== */
img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    display: block;
    margin: 1.5rem auto;
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

img:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: rgba(139, 92, 246, 0.4);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    h1 {
        font-size: 1.5rem;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    td[width="34%"] {
        display: block;
        width: 100% !important;
        padding: 8px 16px;
    }
    
    td[colspan="5"] {
        display: block;
        width: 100%;
    }
    
    tr {
        display: block;
        margin-bottom: 1rem;
        background: rgba(255,255,255,0.7);
        backdrop-filter: blur(4px);
        border-radius: 16px;
        overflow: hidden;
    }
    
    td[bgcolor="#00FFFF"] {
        display: block;
        width: 100%;
    }
    
    ul, .clean-list {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    p {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    h1 {
        font-size: 1.25rem;
        border-radius: 18px;
    }
    
    td[colspan="5"] a {
        font-size: 0.8rem;
        word-break: break-all;
    }
    
    p {
        font-size: 0.85rem;
        padding: 0.9rem;
    }
}

/* ==================== TABLES GENERAL ==================== */
table {
    width: 100%;
    margin-bottom: 1rem;
}

/* ==================== HEADER INCLUDE STYLES ==================== */
a[href="/"] {
    display: block;
    text-align: center;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(8px);
    color: #6b46c1 !important;
    padding: 1rem;
    margin: 0 0 1.5rem 0;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.6);
}

a[href="/"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.95);
    color: #8b5cf6 !important;
}

p[style*="max-width: 80vw"] {
    text-align: center;
    background: rgba(108, 76, 184, 0.55);
    backdrop-filter: blur(12px);
    color: #fef9c3;
    border: 1px solid rgba(255,255,255,0.3);
    font-weight: 500;
}

p[style*="max-width: 80vw"] a {
    color: #fef9c3;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

p[style*="max-width: 80vw"] a:hover {
    color: #ffffff;
}

/* ==================== CLEAN LIST OVERRIDES ==================== */
.clean-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0;
    margin: 1.5rem 0;
}

.clean-list li {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.clean-list li:hover {
    background: rgba(255,255,255,0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: rgba(139, 92, 246, 0.3);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    animation: fadeInDown 0.5s ease;
}

table:not([width="90%"]) {
    animation: fadeInUp 0.4s ease;
}

/* ==================== ADDITIONAL POLISH ==================== */
html {
    scroll-behavior: smooth;
}

a:focus {
    outline: 2px solid #c4b5fd;
    outline-offset: 2px;
}

::selection {
    background: #c4b5fd;
    color: #4c1d95;
}

/* Scrollbar styling - soft */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5e6d3;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a78bfa;
}