body {
    padding: 20px;
    font-family: 'Segoe UI', sans-serif;
    background-color: #fdfdfd;
}


/* --- Navbar --- */
nav {
    background: #0077cc;
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
}
nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    transition: color 0.3s;
}
nav a:hover { color: #ffdd57; }

/* --- Hero Section --- */
.hero {
    padding: 70px 24px;
    background: linear-gradient(120deg, #6a11cb, #2575fc);
    color: #fff;
    text-align: center;
    border-radius: 18px;
    margin-bottom: 48px;
    box-shadow: 0 8px 32px #6a11cb1a, 0 2px 8px #2575fc14;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    top: -60px; left: -60px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, #fff3 60%, transparent 100%);
    z-index: 0;
}
.hero h1 {
    font-size: 2.8em;
    margin-bottom: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px #0002;
    z-index: 1;
    position: relative;
}
.hero p {
    font-size: 1.25em;
    margin-bottom: 28px;
    color: #e0eaff;
    z-index: 1;
    position: relative;
}
.hero button {
    padding: 14px 32px;
    font-size: 1.1em;
    background: linear-gradient(90deg, #ffb347, #ffcc33);
    color: #232323;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px #ffb34733;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    z-index: 1;
    position: relative;
}
.hero button:hover {
    background: linear-gradient(90deg, #ffcc33, #ffb347);
    color: #0077cc;
    box-shadow: 0 4px 16px #ffb34755;
}

/* --- Features & Cards --- */
.features { text-align: center; margin-top: 24px; }
.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    margin-top: 36px;
}
.card {
    background: linear-gradient(135deg, #f8fafc 60%, #e0e7ff 100%);
    border: 1.5px solid #b6c9e2;
    border-radius: 16px;
    padding: 28px 22px;
    width: 270px;
    color: #232323;
    box-shadow: 0 6px 18px #2575fc12, 0 1.5px 6px #6a11cb0a;
    transition: transform 0.25s cubic-bezier(.4,2,.6,1), box-shadow 0.25s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}
.card::before {
    content: "";
    position: absolute;
    top: -30px; right: -30px;
    width: 80px; height: 80px;
    background: radial-gradient(circle, #6a11cb22 60%, transparent 100%);
    z-index: 0;
}
.card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 12px 32px #2575fc22, 0 2px 8px #6a11cb17;
    border-color: #6a11cb;
}
.card h3 {
    margin-bottom: 12px;
    color: #2575fc;
    font-weight: 700;
    font-size: 1.25em;
    letter-spacing: 0.5px;
    z-index: 1;
    position: relative;
}
.card:nth-child(1) { animation-delay: 0.2s; }
.card:nth-child(2) { animation-delay: 0.4s; }
.card:nth-child(3) { animation-delay: 0.6s; }
.card:nth-child(4) { animation-delay: 0.8s; }
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0);}
}

/* --- Content & Headings --- */
.content {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px #0001;
    text-align: center;
}
h1 { color: #0077cc; margin-bottom: 10px; }
p { font-size: 1.1em; color: #555; }

/* --- Buttons --- */
button, .btn {
    padding: 10px 20px;
    background: linear-gradient(90deg, #0077cc 60%, #005fa3 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 20px;
    font-weight: 600;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    box-shadow: 0 2px 8px #0077cc22;
}
button:hover, .btn:hover {
    background: linear-gradient(90deg, #005fa3 60%, #0077cc 100%);
    box-shadow: 0 4px 16px #0077cc33;
    transform: translateY(-2px) scale(1.03);
}

/* --- Forms --- */
form {
    text-align: center;
    margin: 40px auto;
    max-width: 500px;
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
    padding: 32px 24px;
    border-radius: 16px;
    box-shadow: 0 8px 32px #0077cc14, 0 1.5px 6px #0001;
    border: 1px solid #e3eaf1;
    transition: box-shadow 0.3s;
}
form:hover {
    box-shadow: 0 12px 40px #0077cc22, 0 2px 8px #0002;
}
form input,
form select,
form textarea {
    width: 90%;
    padding: 12px 14px;
    margin: 12px 0;
    border: 1px solid #b6c9e2;
    border-radius: 8px;
    font-size: 1em;
    background: #fafdff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
form input[type="radio"],
form input[type="checkbox"] {
    width: auto;
    margin: 0 8px 0 0;
    vertical-align: middle;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
    border: none;
}
form input:focus,
form select:focus,
form textarea:focus {
    border-color: #0077cc;
    outline: none;
    background: #f0f8ff;
}
form label {
    display: block;
    margin-bottom: 6px;
    color: #0077cc;
    font-weight: 600;
    text-align: left;
    letter-spacing: 0.5px;
}
form button {
    width: 100%;
    margin-top: 20px;
    padding: 12px 0;
    font-size: 1.1em;
    border-radius: 8px;
    background: linear-gradient(90deg, #0077cc 60%, #005fa3 100%);
    box-shadow: 0 2px 8px #0077cc15;
    transition: background 0.2s, box-shadow 0.2s;
}
form button:hover {
    background: linear-gradient(90deg, #005fa3 60%, #0077cc 100%);
    box-shadow: 0 4px 16px #0077cc22;
}

/* --- Typing Animation --- */
.typing::after {
    content: '|';
    animation: blink 1s infinite;
    color: #0077cc;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Table --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 1em;
}
th, td {
    border: 1px solid #e3eaf1;
    padding: 10px;
    text-align: center;
}
th {
    background: linear-gradient(90deg, #0077cc 70%, #005fa3 100%);
    color: #fff;
    letter-spacing: 0.5px;
}
tr:nth-child(even) { background: #f8fafc; }
tr:hover { background: #eaf4fb; }

/* --- Tips Card Layout --- */
.tips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 32px;
    justify-content: center;
}
.tip-card {
    background: #fff;
    border-left: 5px solid #0077cc;
    padding: 20px 18px;
    width: 280px;
    border-radius: 10px;
    box-shadow: 0 4px 16px #0077cc11;
    transition: box-shadow 0.2s, transform 0.2s;
}
.tip-card:hover {
    box-shadow: 0 8px 28px #0077cc22;
    transform: translateY(-6px) scale(1.03);
}
.tip-card h3 {
    margin-bottom: 10px;
    color: #0077cc;
    font-size: 1.18em;
    font-weight: 700;
    letter-spacing: 0.2px;
}


/* Table Styling */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.95em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.history-table th, .history-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.history-table th {
    background-color: #0077cc;
    color: white;
    font-weight: 600;
}

.history-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.history-table tr:hover {
    background-color: #eef6ff;
}

/* Clear Button */
.clear-btn {
    background-color: #cc0000;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background-color: #990000;
}

/* Download Button */

.download-btn {
    background-color: #0077cc;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

.download-btn:hover {
    background-color: #005fa3;
}


/* Responsive Table */
@media (max-width: 768px) {
    .history-table, thead, tbody, th, td, tr {
        display: block;
    }

    .history-table thead tr {
        display: none;
    }

    .history-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 10px;
    }

    .history-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    .history-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        font-weight: bold;
        text-align: left;
    }
}


/* Responsive Layout */
@media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 10px;
    }

    td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        font-weight: bold;
        text-align: left;
    }
}

/* --- Button Styles --- */
.btn {
    display: inline-block;
    padding: 10px 24px;
    margin-bottom: 18px;
    background: linear-gradient(90deg, #0077cc 60%, #005fa3 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px #0077cc22;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover {
    background: linear-gradient(90deg, #005fa3 60%, #0077cc 100%);
    box-shadow: 0 4px 16px #0077cc33;
    transform: translateY(-2px) scale(1.03);
}

/* --- Tips Card Layout --- */
.tips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 32px;
    justify-content: center;
}
.tip-card {
    background: #fff;
    border-left: 5px solid #0077cc;
    padding: 20px 18px;
    width: 280px;
    border-radius: 10px;
    box-shadow: 0 4px 16px #0077cc11;
    transition: box-shadow 0.2s, transform 0.2s;
}
.tip-card:hover {
    box-shadow: 0 8px 28px #0077cc22;
    transform: translateY(-6px) scale(1.03);
}
.tip-card h3 {
    margin-bottom: 10px;
    color: #0077cc;
    font-size: 1.18em;
    font-weight: 700;
    letter-spacing: 0.2px;
}