:root {
    --bg-body: #f4f7f6;
    --bg-nav: #ffffff;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --accent-color: #D94F5C;
    --card-bg: #ffffff;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --footer-bg: #dfe6e9;
    --nav-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}


[data-theme="dark"] {
    --bg-body: #1e1e24;
    --bg-nav: #2d2d34;
    --text-primary: #f1f2f6;
    --text-secondary: #b2bec3;
    --accent-color: #ff7675;
    --card-bg: #2d2d34;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --footer-bg: #111116;
    --nav-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body {
    font-family: "Varela Round", sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.main-content {
    margin-top: 100px;
    margin-bottom: 50px;
}

.navbar {
    background-color: var(--bg-nav) !important;
    box-shadow: var(--nav-shadow);
    transition: background-color 0.4s ease;
}

.navbar-brand {
    font-weight: bold;
    color: var(--accent-color) !important;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    margin-left: 15px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

/* Nút Theme Toggle */
.btn-theme {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-theme:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: rotate(15deg);
}

/* --- SVG Animation --- */
.anime-svg {
    height: 120px;
    margin-top: 20px;
    text-align: center;
}

.anime-svg svg {
    width: 100%;
    height: 100%;
    max-width: 600px;
}

.anime-svg text {
    font-family: "Russo One", sans-serif;
    font-size: 55px;
    fill: transparent;
    stroke: var(--accent-color);
    stroke-width: 2;
    text-anchor: middle;
    animation: stroke-anim 4s infinite alternate;
}

@keyframes stroke-anim {
    0% {
        stroke-dasharray: 0 50%;
        stroke-dashoffset: 20%;
        fill: transparent;
    }

    100% {
        stroke-dasharray: 50% 0;
        stroke-dashoffset: -20%;
        fill: var(--accent-color);
    }
}

.author-label {
    text-align: right;
    margin-right: 10%;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

.wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
}

.card-item {
    width: 300px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.card-item:hover {
    transform: translateY(-10px) scale(1.02);
}

.card-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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


.card-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.4s ease;
}

.card-item:hover::before {
    opacity: 1;
}

.info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
    color: white;

}

.card-item:hover .info {
    transform: translateY(0);
    opacity: 1;
}

.info h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.info p {
    font-size: 0.9rem;
    margin-bottom: 20px;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-action {
    padding: 8px 20px;
    border: none;
    border-radius: 30px;
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-action:hover {
    transform: scale(1.05);
    background: white;
    color: var(--accent-color);
}

/* --- Footer --- */
footer {
    background-color: var(--footer-bg);
    padding: 40px 0;
    text-align: center;
    transition: background-color 0.4s;
    margin-top: 50px;
}

.social-icons {
    margin-bottom: 15px;
}

.social-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin: 0 10px;
    background: white;
    color: #333;
    border-radius: 50%;
    text-decoration: none !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, background 0.3s;
}

.social-link:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}


.navbar-toggler {
    border: none;
    outline: none !important;
}

.navbar-toggler i {
    color: var(--text-primary);
    font-size: 1.5rem;
}