/* ================================
   Animations & Keyframes
   ================================ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes gradientShift {
    0% {
        border-top-color: #b12124;
    }
    50% {
        border-top-color: #ff4444;
    }
    100% {
        border-top-color: #b12124;
    }
}

/* ================================
   Light mode styles
   ================================ */
body {
    background-color: #defffc;
    color: #333;
    font-family: 'biome light', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    background-color: #000222;
    color: #b12124;
    padding: 14px 20px;
    font-family: 'biome', sans-serif;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #b12124;
    font-family: 'biome', sans-serif;
}

.header-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

/* ================================
   Dark mode styles
   ================================ */
.dark-mode {
    background-color: #5d5d5d;
    color: #fff;
}

.dark-mode body {
    background-color: #000;
    color: #fff;
    font-family: 'biome light', sans-serif;
}

.dark-mode header {
    background-color: #1a1a1a;
}

.dark-mode header h1 {
    color: #defffc;
}

/* ================================
   Common styles for both modes
   ================================ */
main {
    margin: 20px;
    padding: 10px;
}

/* ================================
   Section & Typography Styles
   ================================ */
section {
    margin-bottom: 2rem;
    animation: fadeUp 0.6s ease-out;
}

section h2 {
    font-family: 'biome', sans-serif;
    color: #b12124;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.75rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #b12124;
    border-radius: 2px;
}

.dark-mode section h2 {
    color: #defffc;
}

.dark-mode section h2::after {
    background-color: #defffc;
}

section p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ================================
   Footer styles
   ================================ */
footer {
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    font-family: 'biome light', sans-serif;
    transition: color 0.3s ease;
}

.dark-mode footer {
    color: #fff;
    font-family: 'biome light', sans-serif;
}


/* ================================
   Card Grid & Card Styles
   ================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    animation: fadeUp 0.6s ease-out;
}

.card {
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #b12124 0%, #ff4444 50%, #b12124 100%);
    background-size: 200% 100%;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover {
    border-color: #b12124;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(177, 33, 36, 0.15);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h3 {
    font-family: 'biome', sans-serif;
    color: #000222;
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.card:hover h3 {
    color: #b12124;
}

.card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0.5rem 0;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Dark mode card styles */
.dark-mode .card {
    background-color: #1a1a1a;
    border-color: #444;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.dark-mode .card:hover {
    border-color: #defffc;
    box-shadow: 0 8px 16px rgba(222, 255, 252, 0.15);
}

.dark-mode .card h3 {
    color: #defffc;
}

.dark-mode .card:hover h3 {
    color: #defffc;
}

.dark-mode .card p {
    color: #ccc;
}

/* ================================
   Button Styles
   ================================ */
button {
    font-family: 'biome light', sans-serif;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
}

button:focus {
    outline: 2px solid #b12124;
    outline-offset: 2px;
}

/* Primary button style */
.btn,
.btn-primary {
    background-color: #b12124;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: 2px solid #b12124;
    font-size: 1rem;
}

.btn:hover,
.btn-primary:hover {
    background-color: #8b1a1c;
    border-color: #8b1a1c;
    box-shadow: 0 4px 12px rgba(177, 33, 36, 0.3);
    transform: translateY(-1px);
}

.btn:active,
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(177, 33, 36, 0.3);
}

/* Secondary button style (copy-to-clipboard variant) */
.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    padding: 0.65rem 1.25rem;
    border: 2px solid #ddd;
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
    border-color: #b12124;
    box-shadow: 0 4px 12px rgba(177, 33, 36, 0.15);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(177, 33, 36, 0.1);
}

/* Dark mode button styles */
.dark-mode .btn,
.dark-mode .btn-primary {
    background-color: #b12124;
    border-color: #b12124;
    color: #fff;
}

.dark-mode .btn:hover,
.dark-mode .btn-primary:hover {
    background-color: #d44449;
    border-color: #d44449;
    box-shadow: 0 4px 12px rgba(177, 33, 36, 0.5);
}

.dark-mode .btn-secondary {
    background-color: #333;
    color: #fff;
    border-color: #555;
}

.dark-mode .btn-secondary:hover {
    background-color: #444;
    border-color: #defffc;
    box-shadow: 0 4px 12px rgba(222, 255, 252, 0.15);
}

/* Toggle button (dark mode) */
#darkModeToggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #b12124;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: 2px solid #b12124;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    font-family: 'biome light', sans-serif;
    font-weight: 500;
}

#darkModeToggle:hover {
    background-color: #8b1a1c;
    border-color: #8b1a1c;
    box-shadow: 0 4px 12px rgba(177, 33, 36, 0.3);
    transform: translateY(-2px);
}

#darkModeToggle:active {
    transform: translateY(0);
}

.dark-mode #darkModeToggle {
    background-color: #b12124;
    border-color: #b12124;
}

.dark-mode #darkModeToggle:hover {
    background-color: #d44449;
    border-color: #d44449;
    box-shadow: 0 4px 12px rgba(177, 33, 36, 0.5);
}

/* ================================
   Navigation Styles
   ================================ */
nav {
    margin-bottom: 2rem;
    animation: slideIn 0.5s ease-out;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

nav li {
    display: inline-block;
}

nav a {
    font-family: 'biome', sans-serif;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.dark-mode nav a {
    color: #defffc;
}

.dark-mode nav a:visited {
    color: #b3ccff;
}

/* ================================
   Table styles
   ================================ */
table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse;
    background-color: #fff;
    border: 2px solid #b12124;
    border-radius: 5px;
    animation: fadeUp 0.6s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #b12124;
}

th {
    background-color: #000222;
    color: #b12124;
    font-family: 'biome', sans-serif;
}

.dark-mode table {
    background-color: #333;
    border-color: #defffc;
}

.dark-mode th, .dark-mode td {
    border-bottom: 1px solid #defffc;
}

.dark-mode th {
    background-color: #1a1a1a;
    color: #defffc;
}

::selection
 {
    color: #fff;
    background-color: #b12124;
}

a {   
    color: red; 
    text-decoration: none;  
}
a:visited {   
    color: purple;   
    text-decoration: none;
}
a:hover {   
    color: black;  
    text-decoration: underline; 
}
a:active {   
    color: white;   
    text-decoration: underline;
}
