/* Navy Blue Theme with Yellow Headers and Roboto Font */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

:root {
    --navy-dark: #0f172a;
    --navy-medium: #1e293b;
    --navy-light: #334155;
    --navy-lighter: #475569;
    --yellow-bright: #fbbf24;
    --yellow-warm: #f59e0b;
    --yellow-light: #fef3c7;
    --black: #000000;
    --white: #ffffff;
    --gray-light: #f8fafc;
    --shadow: rgba(15, 23, 42, 0.3);
    --shadow-strong: rgba(15, 23, 42, 0.5);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--navy-dark);
    font-size: 16px;
    font-weight: 400;
}

/* Header styles */
header {
    background: var(--navy-dark);
    padding: 4rem 2rem 3rem;
    text-align: center;
    position: relative;
    border-bottom: 2px solid var(--navy-medium);
}

header h1 {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    color: var(--yellow-bright);
    text-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

header .tagline {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    color: var(--yellow-bright);
    font-weight: 500;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Word Cloud Styles */
.wordcloud {
    margin: 2rem auto 0;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.css-wordcloud {
    display: block !important;
    visibility: visible !important;
}

.cloud-container {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem 1.5rem;
    padding: 2rem 1.5rem;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid var(--yellow-bright);
    box-shadow: 0 8px 32px var(--shadow-strong);
    min-height: 100px;
    position: relative;
}

.cloud-container::before {
    content: "📚 TOPICS";
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--yellow-bright);
    letter-spacing: 0.1em;
}

.cloud-word {
    color: var(--yellow-bright) !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    padding: 0.7rem 1.4rem;
    border-radius: 25px;
    background: rgba(251, 191, 36, 0.1);
    border: 2px solid var(--yellow-bright);
    white-space: nowrap;
    display: inline-block;
    margin: 0.3rem;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cloud-word:hover {
    transform: translateY(-4px) scale(1.1);
    background: var(--yellow-bright);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.5);
    color: var(--navy-dark) !important;
    border-color: var(--yellow-warm);
}

/* Main content */
main {
    max-width: 1000px;
    margin: 3rem auto 0;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.posts {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px var(--shadow);
    border: 1px solid var(--navy-light);
    position: relative;
}

.posts::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--yellow-bright);
    border-radius: 20px 20px 0 0;
}

.posts h2 {
    font-family: 'Roboto', sans-serif;
    color: var(--yellow-bright);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 2.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

.posts h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--yellow-bright);
    border-radius: 2px;
}

.posts ul {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.posts li {
    background: var(--white);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--gray-light);
    overflow: hidden;
    position: relative;
}

.posts li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--yellow-bright);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.posts li:hover::before {
    transform: scaleY(1);
}

.posts li:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px var(--shadow);
    background: var(--white);
    border-color: var(--yellow-bright);
}

.posts a {
    display: block;
    padding: 1.5rem 2rem;
    text-decoration: none;
    color: var(--black) !important;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.posts a:hover {
    color: var(--black) !important;
}

.posts a .category {
    display: inline-block;
    background: var(--yellow-bright);
    color: var(--navy-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-right: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Roboto', sans-serif;
}

/* Arrow styling */
.posts a {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.posts a::before {
    content: "→";
    font-size: 1.5rem;
    color: var(--yellow-bright);
    font-weight: 900;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.posts li:hover a::before {
    transform: translateX(6px);
    color: var(--yellow-warm);
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
    color: var(--yellow-bright);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    background: var(--navy-dark);
    border-top: 2px solid var(--navy-medium);
}

footer a {
    color: var(--yellow-bright);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid var(--yellow-bright);
    padding-bottom: 2px;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

footer a:hover {
    color: var(--yellow-warm);
    border-bottom-color: var(--yellow-warm);
    transform: translateY(-1px);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--navy-medium);
}

::-webkit-scrollbar-thumb {
    background: var(--yellow-bright);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--yellow-warm);
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        padding: 3rem 1rem 2rem;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .cloud-container {
        gap: 0.5rem 1rem;
        padding: 1.5rem 1rem;
    }
    
    .cloud-word {
        font-size: 0.9em !important;
        padding: 0.5rem 1rem;
        margin: 0.2rem;
    }
    
    main {
        margin-top: 2rem;
        padding: 0 1rem;
    }
    
    .posts {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    .posts h2 {
        font-size: 1.6rem;
    }
    
    .posts a {
        font-size: 1rem;
        padding: 1.2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 2rem 1rem 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .cloud-container {
        gap: 0.4rem 0.8rem;
        padding: 1rem 0.8rem;
    }
    
    .cloud-word {
        font-size: 0.8em !important;
        padding: 0.4rem 0.8rem;
    }
    
    .posts {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }
    
    .posts h2 {
        font-size: 1.4rem;
    }
    
    footer {
        padding: 3rem 1rem 1.5rem;
    }
}

/* Focus styles for accessibility */
.posts a:focus,
.cloud-word:focus {
    outline: 3px solid var(--yellow-bright);
    outline-offset: 3px;
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    header {
        background: white;
    }
    
    header h1,
    header .tagline {
        color: black;
    }
    
    .wordcloud,
    footer {
        display: none;
    }
}
