:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #3f37c9;
    --accent-color: #7209b7;
    --success-color: #4cc9f0;
    --success-dark: #38b6db;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --text-primary: #2b2d42;
    --text-secondary: #4a4e69;
    --bg-primary: #ffffff;
    --bg-secondary: #f4f7fc;
    --border-color: #e9ecef;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.logo span {
    color: #ffd700;
    margin-right: 0.5rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.nav-links {
    display: flex;
    list-style: none;
    transition: var(--transition);
}

.nav-links li {
    margin: 0 1rem;
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-links a i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.nav-links a span {
    display: inline;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background: #ffd700;
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Tool Container */
.tool-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--bg-primary);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    min-height: 70vh;
    transition: all 0.3s ease;
}

.tool-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.5rem;
}

.tool-title::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Tool specific styles */
.tool-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tool-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Todo List Styles */
.todo-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.task-input {
    position: relative;
    height: 52px;
    margin-bottom: 1.5rem;
}

.task-input img {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    width: 20px;
}

.task-input input {
    height: 100%;
    width: 100%;
    padding: 0 20px 0 45px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    outline: none;
    transition: var(--transition);
}

.task-input input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filters span {
    margin: 0 8px;
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
}

.filters span.active {
    color: var(--primary-color);
    font-weight: 600;
}

.clear-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.clear-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.task-box {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.task-box .task {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.task-box .task:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.task label {
    display: flex;
    align-items: center;
}

.task label input {
    margin-right: 10px;
}

.task label p {
    margin: 0;
}

.task label p.checked {
    text-decoration: line-through;
    color: var(--gray-color);
}

.settings {
    position: relative;
}

.task-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-primary);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
    list-style: none;
    transform: scale(0);
    transform-origin: top right;
    transition: transform 0.3s ease;
    z-index: 10;
}

.task-menu.show {
    transform: scale(1);
}

.task-menu li {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.task-menu li:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.task-menu li i {
    margin-right: 8px;
}

/* Password Generator Styles */
.password-container {
    max-width: 600px;
    margin: 0 auto;
}

.input-box {
    position: relative;
    height: 52px;
    margin-bottom: 1.5rem;
}

.input-box input {
    height: 100%;
    width: 100%;
    padding: 0 20px 0 20px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    outline: none;
    transition: var(--transition);
}

.input-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.input-box span {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

.input-box span:hover {
    color: var(--primary-color);
}

.pass-indicator {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.pass-indicator::before {
    content: '';
    position: absolute;
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.pass-indicator#weak::before {
    width: 20%;
    background: var(--danger-color);
}

.pass-indicator#medium::before {
    width: 50%;
    background: var(--warning-color);
}

.pass-indicator#strong::before {
    width: 100%;
    background: var(--success-color);
}

.pass-length {
    margin-bottom: 1.5rem;
}

.pass-length .details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pass-length input {
    width: 100%;
    height: 5px;
    cursor: pointer;
}

.pass-settings {
    margin-bottom: 1.5rem;
}

.pass-settings .title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.options {
    list-style: none;
    margin-bottom: 1.5rem;
}

.option {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.option input {
    margin-right: 10px;
    cursor: pointer;
}

.generate-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.generate-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* QR Code Generator Styles */
.qr-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.qr-form {
    margin-bottom: 1.5rem;
}

.qr-form input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 10px;
    outline: none;
    transition: var(--transition);
}

.qr-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.qr-form button {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.qr-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.qr-code {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    display: inline-block;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.qr-code img {
    max-width: 200px;
    max-height: 200px;
}

.qr-container.active .qr-code {
    transform: scale(1.05);
    box-shadow: var(--card-shadow);
}

.download-qr-btn {
    width: 100%;
    padding: 12px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: none;
    margin-top: 1rem;
}

.download-qr-btn:hover {
    background: var(--success-dark);
    transform: translateY(-2px);
}

/* Age Calculator Styles */
.age-container {
    max-width: 600px;
    margin: 0 auto;
}

.age-form {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.base {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.enter {
    width: 100%;
    text-align: center;
}

.enter h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.block {
    width: 30%;
}

.title {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-secondary);
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    outline: none;
    transition: var(--transition);
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

input[type="button"] {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

input[type="button"]:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

#age {
    text-align: center;
    margin-top: 20px;
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 500;
    padding: 15px;
    background: #f0f4ff;
    border-radius: 5px;
    animation: fadeIn 0.5s ease;
}

/* Academic Calculator Styles */
.academic-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    animation: fadeInUp 0.8s ease-out;
}

.academic-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    position: relative;
    animation: slideInLeft 0.6s ease-out;
}

.academic-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--success-color);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-group {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.8s ease-out;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.academic-input, .academic-select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.academic-input:focus, .academic-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.academic-btn {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.academic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.academic-btn:active {
    transform: translateY(0);
}

.academic-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: #e8f5e9;
    border-radius: 8px;
    display: none;
    animation: slideInUp 0.5s ease-out;
    border-left: 4px solid var(--success-color);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.academic-result p {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.academic-result p b {
    color: var(--text-primary);
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.download-btn {
    background-color: var(--success-color);
    color: white;
}

.download-btn:hover {
    background-color: var(--success-dark);
}

.info-box {
    background-color: #e7f3fe;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 8px 8px 0;
    animation: fadeIn 0.8s ease-out;
}

.info-box h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.academic-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.8s ease-out;
}

.academic-table th, .academic-table td {
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    text-align: left;
}

.academic-table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.academic-table tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

.academic-table tr:hover {
    background-color: var(--light-color);
}

.section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.section:last-child {
    border-bottom: none;
    margin-bottom: 1.5rem;
}

.progress-container {
    width: 100%;
    background-color: var(--light-color);
    border-radius: 10px;
    margin: 1rem 0;
}

.progress-bar {
    height: 20px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    text-align: center;
    line-height: 20px;
    color: white;
    font-size: 0.8rem;
    transition: width 1s ease-in-out;
}

.nav-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-btn {
    padding: 0.6rem 1.2rem;
    background-color: var(--light-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-weight: 600;
}

.nav-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

.download-text-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.download-text-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.example-box {
    background-color: #e7f3fe;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
    border-left: 4px solid var(--primary-color);
}

.example-box h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Refresh Confirmation Modal */
.refresh-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.refresh-content {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.refresh-content h2 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.refresh-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.refresh-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.refresh-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.refresh-confirm {
    background-color: var(--danger-color);
    color: white;
}

.refresh-confirm:hover {
    background-color: #e5177b;
    transform: translateY(-2px);
}

.refresh-cancel {
    background-color: white;
    color: var(--primary-color);
}

.refresh-cancel:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

/* Toast Notification - Centered at Bottom */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid var(--success-color);
    max-width: 90%;
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.toast.error {
    border-left-color: var(--danger-color);
}

/* Footer */
.footer {
    text-align: center;
    padding: 15px;
    background: var(--dark-color);
    color: white;
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
        flex-wrap: wrap;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 99;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links li {
        margin: 0.5rem 0;
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        padding: 0.8rem 1rem;
        width: 100%;
        justify-content: center;
        border-radius: 0;
    }
    
    .nav-links a span {
        display: inline;
    }
    
    .tool-container {
        padding: 1rem;
        margin-bottom: 60px; /* Add space for fixed footer */
    }
    
    .base {
        flex-direction: column;
    }
    
    .block {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .academic-container {
        padding: 1rem;
        margin: 0 1rem 2rem;
        border-radius: 8px;
    }
    
    .academic-title {
        font-size: 1.3rem;
    }
    
    .button-group button {
        width: 100%;
    }
    
    .academic-table th, .academic-table td {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .academic-result {
        padding: 1rem;
    }
    
    .toast {
        width: 90%;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .academic-container {
        padding: 0.8rem;
        margin: 0 0.5rem 1.5rem;
    }
    
    .academic-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .academic-input, .academic-select, .academic-btn {
        padding: 0.7rem;
    }
    
    .nav-container {
        gap: 0.3rem;
    }
    
    .nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .download-text-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .toast {
        width: 95%;
        padding: 0.7rem 0.9rem;
        font-size: 0.8rem;
    }
    
    .refresh-content {
        padding: 1.5rem;
    }
    
    .refresh-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .refresh-btn {
        width: 100%;
    }
}