:root {
    --primary-color: #c92424;
    --primary-dark: #a71d1d;
    --secondary-color: #1e3a8a;
    --text-light: #f8f8f8;
    --text-dark: #333;
    --bg-dark: #16161e;
    --bg-card: #222230;
    --bg-light: #f0f0f0;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-dark);
    position: relative;
    overflow-x: hidden;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    opacity: 0.12;
    z-index: -1;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(22, 22, 30, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo img {
    height: 3.5rem;
    transition: transform var(--transition-speed);
}

.logo img:hover {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem;
    transition: color var(--transition-speed);
    position: relative;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all var(--transition-speed);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
    left: 0;
}

.apply-btn {
    background-color: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 4px;
    transition: background-color var(--transition-speed);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 3px 0;
    transition: all var(--transition-speed);
}

/* Main Content */
main {
    min-height: calc(100vh - 180px);
    padding: 2rem 0;
}

.dev-diaries {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: rgba(34, 34, 48, 0.8);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    text-transform: uppercase;
    color: var(--text-light);
}

.underline {
    height: 3px;
    width: 100px;
    background-color: var(--primary-color);
    margin: 0.5rem auto;
}

/* Filter Controls */
.filter-controls {
    margin-bottom: 2rem;
}

.search-bar {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #444;
    background-color: #1a1a24;
    color: var(--text-light);
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    transition: border-color var(--transition-speed);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

.filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background-color: var(--bg-card);
    border: 1px solid #444;
    border-radius: 4px;
    color: var(--text-light);
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.filter-btn:hover {
    background-color: #2a2a3a;
}

.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Diaries Grid */
.diaries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.diary-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.diary-card:hover {
    transform: translateY(-5px);
}

.diary-number {
    position: absolute;
    top: -15px;
    right: -15px;
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
}

.diary-info {
    flex-grow: 1;
}

.diary-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.diary-date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.diary-excerpt {
    color: #b0b0b0;
    margin-bottom: 1.5rem;
}

.diary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background-color: rgba(201, 36, 36, 0.2);
    color: var(--text-light);
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    border: 1px solid rgba(201, 36, 36, 0.3);
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    transition: color var(--transition-speed);
}

.read-more:hover {
    color: #f0505c;
}

.read-more::after {
    content: '→';
    margin-left: 5px;
    transition: transform var(--transition-speed);
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card);
    border: 1px solid #444;
    border-radius: 4px;
    color: var(--text-light);
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.page-btn:hover {
    background-color: #2a2a3a;
}

.page-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-separator {
    color: #666;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 0;
}

.no-results i {
    font-size: 3rem;
    color: #666;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.no-results p {
    color: #888;
    margin-bottom: 1.5rem;
}

.reset-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

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

/* Footer */
footer {
    background-color: rgba(13, 13, 18, 0.95);
    padding: 3rem 5% 1rem;
    margin-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo img {
    height: 3rem;
    margin-bottom: 1rem;
}

.footer-logo p {
    color: #b0b0b0;
}

.footer-links h3,
.footer-contact h3 {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a,
.footer-contact a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color var(--transition-speed);
}

.footer-links ul li a:hover,
.footer-contact a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    color: #b0b0b0;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

.footer-bottom p {
    color: #666;
    font-size: 0.9rem;
}

/* Media Queries */
@media screen and (max-width: 900px) {
    nav {
        position: fixed;
        top: 5rem;
        right: -100%;
        width: 70%;
        height: calc(100vh - 5rem);
        background-color: rgba(22, 22, 30, 0.98);
        transition: right var(--transition-speed);
        box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
    }
    
    nav ul li {
        margin: 1rem 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .diaries-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .dev-diaries {
        padding: 1.5rem;
    }
    
    .section-header h1 {
        font-size: 2rem;
    }
    
    .filter-categories {
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .dev-diaries {
        padding: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo {
        align-items: center;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

