/* Base Styles */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --secondary-dark: #27ae60;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-light: #f5f7fa;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --font-family: 'Poppins', sans-serif;
}

/* Dark Theme */
body.dark-theme {
    --primary-color: #4ea8de;
    --primary-dark: #3d8bd8;
    --secondary-color: #33d17a;
    --secondary-dark: #2bb469;
    --text-color: #e4e6eb;
    --text-light: #b0b3b8;
    --bg-color: #121212;
    --bg-light: #1e1e1e;
    --border-color: #383838;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Dark Mode Calculator Styles */
body.dark-theme .calculator-container {
    background: var(--bg-color);
    box-shadow: 0 10px 30px var(--shadow-color);
}

body.dark-theme .calculator-display {
    background: var(--bg-light);
    box-shadow: inset 0 2px 5px var(--shadow-color);
}

body.dark-theme .previous-operand {
    color: var(--text-light);
}

body.dark-theme .current-operand {
    color: var(--text-color);
}

body.dark-theme .calc-btn {
    background: var(--bg-light);
    color: var(--text-color);
    box-shadow: 0 2px 5px var(--shadow-color);
}

body.dark-theme .calc-btn.number {
    background: var(--bg-color);
    color: var(--text-color);
}

body.dark-theme .calc-btn.operator {
    background: var(--primary-color);
    color: white;
}

body.dark-theme .calc-btn.function {
    background: var(--bg-light);
    color: var(--text-color);
}

body.dark-theme .calc-btn.equals {
    background: var(--primary-color);
    color: white;
}

body.dark-theme .calculator-history {
    background: var(--bg-light);
    box-shadow: 0 2px 5px var(--shadow-color);
}

body.dark-theme .calculator-history h3 {
    color: var(--text-color);
}

body.dark-theme .history-item {
    border-bottom-color: var(--border-color);
}

body.dark-theme .history-item:hover {
    background-color: var(--bg-color);
}

body.dark-theme .history-calculation {
    color: var(--text-color);
}

body.dark-theme .history-timestamp {
    color: var(--text-light);
}

/* Touch Device Dark Mode Optimizations */
@media (hover: none) {
    body.dark-theme .calc-btn:hover {
        transform: none;
        box-shadow: 0 2px 5px var(--shadow-color);
    }
    
    body.dark-theme .calc-btn:active {
        background-color: var(--primary-color);
        color: white;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 15px;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 15px;
}

input, select, textarea, button {
    font-family: var(--font-family);
}

input, select, textarea {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

button {
    cursor: pointer;
}

/* Utility Classes */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-text {
    background: none;
    border: none;
    padding: 5px 10px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.btn-text:hover {
    color: var(--primary-color);
}

.btn-copy {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.btn-copy:hover {
    color: var(--primary-color);
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.theme-toggle {
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 0;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--primary-color);
    display: block;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* Tools Section */
.tools-section {
    padding: 80px 0;
    text-align: center;
}

.tools-section h2 {
    margin-bottom: 20px;
}

.tools-section h2 span {
    color: var(--primary-color);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.tool-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.tool-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.tool-card h3 {
    margin-bottom: 10px;
}

.tool-card p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Tool Content Section */
.tool-content-section {
    display: block;
    padding: 60px 0;
    width: 100%;
}

.back-to-tools {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
}

.back-to-tools:hover {
    color: var(--primary-color);
}

.tool-content {
    display: none;
    width: 100%;
}

.tool-content h2 {
    text-align: center;
    margin-bottom: 40px;
}

.tool-container {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.about-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.about-section h2 span {
    color: var(--primary-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.feature {
    text-align: center;
}

.feature i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature h3 {
    margin-bottom: 10px;
}

.feature p {
    color: var(--text-light);
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.contact-section h2 span {
    color: var(--primary-color);
}

.contact-container {
    display: flex;
    gap: 50px;
}

.contact-form {
    flex: 2;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
}

.contact-info {
    flex: 1;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.info-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-color);
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Footer */
.footer {
    background-color: var(--bg-light);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    gap: 20px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow-color);
    display: flex;
    flex-direction: column;
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.35);
    z-index: 1000;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.info {
    border-left: 4px solid var(--info-color);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
}

.toast-content i {
    font-size: 1.5rem;
    margin-right: 15px;
}

.toast.success i {
    color: var(--success-color);
}

.toast.error i {
    color: var(--error-color);
}

.toast.info i {
    color: var(--info-color);
}

.message {
    display: flex;
    flex-direction: column;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.toast-message {
    color: var(--text-light);
    font-size: 0.9rem;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background-color: var(--border-color);
}

.toast.success .toast-progress::before {
    background-color: var(--success-color);
}

.toast.error .toast-progress::before {
    background-color: var(--error-color);
}

.toast.info .toast-progress::before {
    background-color: var(--info-color);
}

.toast-progress::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 100%;
    height: 100%;
    width: 100%;
    animation: progress 3s linear forwards;
}

@keyframes progress {
    100% {
        right: 0;
    }
}

/* Task Manager Styles */
.task-manager-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.task-input-section {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.task-input-section h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.task-input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-input-group input {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
}

.task-options {
    display: flex;
    gap: 15px;
}

.priority-select, .due-date {
    flex: 1;
}

.priority-select label, .due-date label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.priority-select select, .due-date input {
    width: 100%;
}

.task-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.filter-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.sort-options {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.sort-options select {
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.tasks-container {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 10px var(--shadow-color);
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.tasks-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.empty-tasks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-light);
}

.empty-tasks i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: var(--border-radius);
    background-color: var(--bg-light);
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.task-item:hover {
    box-shadow: 0 2px 8px var(--shadow-color);
}

.task-item.priority-high {
    border-left-color: var(--error-color);
}

.task-item.priority-medium {
    border-left-color: var(--warning-color);
}

.task-item.priority-low {
    border-left-color: var(--success-color);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-light);
}

.task-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.task-checkbox {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-light);
    transition: var(--transition);
}

.task-checkbox:hover {
    color: var(--primary-color);
}

.task-checkbox i.fa-check-circle {
    color: var(--success-color);
}

.task-text {
    flex: 1;
}

.task-due-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 4px 8px;
    border-radius: 12px;
    background-color: var(--bg-color);
}

.task-due-date.overdue {
    color: var(--error-color);
    background-color: rgba(231, 76, 60, 0.1);
}

.task-due-date.due-today {
    color: var(--warning-color);
    background-color: rgba(243, 156, 18, 0.1);
}

.task-due-date.due-soon {
    color: var(--info-color);
    background-color: rgba(52, 152, 219, 0.1);
}

.task-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-delete {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.5;
}

.task-delete:hover {
    color: var(--error-color);
    opacity: 1;
}

.task-item:hover .task-delete {
    opacity: 0.8;
}

.task-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light);
}

/* AI Text Humanizer Styles */
.ai-text-converter-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.text-converter-description {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 15px;
    border-left: 4px solid var(--primary-color);
}

.humanize-options {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 15px;
}

.tone-selector, .complexity-slider {
    flex: 1;
}

.tone-selector label, .complexity-slider label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.tone-selector select {
    width: 100%;
}

.complexity-slider input {
    width: 100%;
}

#complexity-value {
    font-weight: 500;
}

.comparison-section {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 20px;
}

.comparison-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.comparison-container {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
}

#text-comparison {
    font-family: monospace;
    white-space: pre-wrap;
    line-height: 1.5;
}

#text-comparison ins {
    background-color: rgba(46, 204, 113, 0.2);
    text-decoration: none;
    color: var(--success-color);
}

#text-comparison del {
    background-color: rgba(231, 76, 60, 0.2);
    color: var(--error-color);
}

/* WiFi Speed Checker Styles */
.wifi-speed-checker-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.speed-info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.speed-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 10px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.speed-card.download {
    border-bottom: 3px solid var(--primary-color);
}

.speed-card.upload {
    border-bottom: 3px solid var(--secondary-color);
}

.speed-card.ping {
    border-bottom: 3px solid var(--warning-color);
}

.speed-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.download .speed-icon {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
}

.upload .speed-icon {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--secondary-color);
}

.ping .speed-icon {
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
}

.speed-details {
    flex: 1;
}

.speed-details h3 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.speed-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.speed-value span {
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--text-light);
}

.test-controls {
    display: flex;
    gap: 15px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 15px;
    align-items: flex-end;
}

.server-selection {
    flex: 1;
}

.server-selection label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.server-selection select {
    width: 100%;
}

.user-location-info {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--info-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.location-detected, .isp-info, .connection-type {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
    padding: 8px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
}

.location-detected:hover, .isp-info:hover, .connection-type:hover {
    background-color: var(--bg-light);
}

.location-detected i, .isp-info i, .connection-type i {
    font-size: 1.1rem;
    color: var(--primary-color);
    min-width: 16px;
}

.location-detected span, .isp-info span, .connection-type span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
}

.connection-type i {
    color: var(--secondary-color);
}

.isp-info i {
    color: var(--info-color);
}

.speed-gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
}

.speed-gauge {
    position: relative;
    width: 200px;
    height: 200px;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge-background {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 10;
}

.gauge-progress {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 0.5s ease;
}

.gauge-needle {
    fill: var(--text-color);
    transform-origin: center;
    transition: transform 0.5s ease;
}

.gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#gauge-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.gauge-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

#test-status {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.speed-history {
    margin-top: 30px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.speed-history h3 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.speed-history h3::before {
    content: '\f017';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-color);
}

.history-table-container {
    overflow-x: auto;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.history-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.history-info {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

/* Enhanced table styling for the history */
.history-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.history-table th,
.history-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-table th {
    font-weight: 600;
    color: var(--text-color);
    background-color: var(--bg-light);
    position: sticky;
    top: 0;
    z-index: 1;
}

.history-table td {
    color: var(--text-light);
    font-size: 0.9rem;
}

.history-table tbody tr:hover {
    background-color: var(--bg-light);
}

/* Column widths */
.history-table th:nth-child(1) { width: 18%; } /* Date & Time */
.history-table th:nth-child(2) { width: 12%; } /* Download */
.history-table th:nth-child(3) { width: 12%; } /* Upload */
.history-table th:nth-child(4) { width: 10%; } /* Ping */
.history-table th:nth-child(5) { width: 15%; } /* Server */
.history-table th:nth-child(6) { width: 13%; } /* Connection */
.history-table th:nth-child(7) { width: 20%; } /* ISP & Country */

/* More prominent ISP & Country styling */
.history-table td:nth-child(7) {
    font-weight: 500;
    color: var(--primary-color);
}

/* Improved mobile responsiveness */
@media (max-width: 768px) {
    .history-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        table-layout: auto;
        border: none;
        box-shadow: none;
    }
    
    .history-table th,
    .history-table td {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 8px 6px;
    }
    
    .history-table th:nth-child(n),
    .history-table td:nth-child(n) {
        width: auto;
    }
    
    .history-table-container {
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* Empty state for history */
.text-center {
    text-align: center !important;
    padding: 20px !important;
    color: var(--text-light);
    font-style: italic;
}

/* Responsive adjustments for new tools */
@media (max-width: 768px) {
    .humanize-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .speed-info-cards {
        grid-template-columns: 1fr;
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 40px 0;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .about-content {
        flex-direction: column-reverse;
        gap: 30px;
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .calculator-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: center;
        padding: 20px;
        box-shadow: 0 5px 15px var(--shadow-color);
        border-radius: var(--border-radius);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: var(--transition);
    }
    
    .nav-links.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tool-card {
        padding: 20px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .task-options {
        flex-direction: column;
    }
    
    .task-filters {
        flex-wrap: wrap;
    }
    
    .sort-options {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .calculator-buttons {
        gap: 0.3rem;
    }
    
    .calc-btn {
        padding: 0.8rem;
        font-size: 1.1rem;
    }
    
    .calculator-history {
        margin-top: 0.8rem;
    }
    
    .history-list {
        max-height: 150px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .tool-card {
        padding: 15px;
    }
    
    .tool-icon {
        font-size: 2rem;
    }
    
    .calculator-display {
        min-height: 70px;
        padding: 0.8rem;
    }
    
    .current-operand {
        font-size: 2rem;
    }
    
    .previous-operand {
        font-size: 1rem;
    }
    
    .calc-btn {
        padding: 0.7rem;
        font-size: 1rem;
    }
    
    .calculator-history h3 {
        font-size: 1.1rem;
    }
    
    .history-calculation {
        font-size: 0.9rem;
    }
    
    .history-timestamp {
        font-size: 0.7rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .calc-btn:hover {
        background: var(--bg-color);
    }
    
    .calc-btn.operator:hover {
        background: var(--primary-color);
    }
    
    .calc-btn.special:hover {
        background: var(--secondary-color);
    }
    
    .tool-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Landscape Mode Optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 20px 0;
    }
    
    .calculator-container {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .calculator-history {
        max-height: 150px;
    }
}

/* High-DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .calc-btn {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero,
    .tools-section,
    .about-section,
    .contact-section,
    .footer {
        display: none;
    }
    
    .tool-content {
        display: block;
    }
    
    .calculator-container {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Dark Mode System Preference */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #e4e6eb;
        --text-light: #b0b3b8;
        --border-color: #383838;
        --shadow-color: rgba(0, 0, 0, 0.3);
    }
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 40px 0;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .about-content {
        flex-direction: column-reverse;
        gap: 30px;
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .calculator-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: center;
        padding: 20px;
        box-shadow: 0 5px 15px var(--shadow-color);
        border-radius: var(--border-radius);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: var(--transition);
    }
    
    .nav-links.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tool-card {
        padding: 20px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .task-options {
        flex-direction: column;
    }
    
    .task-filters {
        flex-wrap: wrap;
    }
    
    .sort-options {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .calculator-buttons {
        gap: 0.3rem;
    }
    
    .calc-btn {
        padding: 0.8rem;
        font-size: 1.1rem;
    }
    
    .calculator-history {
        margin-top: 0.8rem;
    }
    
    .history-list {
        max-height: 150px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .tool-card {
        padding: 15px;
    }
    
    .tool-icon {
        font-size: 2rem;
    }
    
    .calculator-display {
        min-height: 70px;
        padding: 0.8rem;
    }
    
    .current-operand {
        font-size: 2rem;
    }
    
    .previous-operand {
        font-size: 1rem;
    }
    
    .calc-btn {
        padding: 0.7rem;
        font-size: 1rem;
    }
    
    .calculator-history h3 {
        font-size: 1.1rem;
    }
    
    .history-calculation {
        font-size: 0.9rem;
    }
    
    .history-timestamp {
        font-size: 0.7rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .calc-btn:hover {
        transform: none;
        box-shadow: 0 2px 5px var(--shadow-color);
    }
    
    .calc-btn:active {
        background-color: var(--primary-color);
        color: white;
    }
}

/* Landscape Mode Optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 20px 0;
    }
    
    .calculator-container {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .calculator-history {
        max-height: 150px;
    }
}

/* High-DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .calc-btn {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero,
    .tools-section,
    .about-section,
    .contact-section,
    .footer {
        display: none;
    }
    
    .tool-content {
        display: block;
    }
    
    .calculator-container {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Dark Mode System Preference */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #e4e6eb;
        --text-light: #b0b3b8;
        --border-color: #383838;
        --shadow-color: rgba(0, 0, 0, 0.3);
    }
}

/* Calculator Styles */
.calculator-container {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--shadow-color);
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
    transition: var(--transition);
}

.calculator-display {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    text-align: right;
    box-shadow: inset 0 2px 5px var(--shadow-color);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.previous-operand {
    color: var(--text-light);
    font-size: 1.2rem;
    min-height: 24px;
    margin-bottom: 5px;
    word-wrap: break-word;
    word-break: break-all;
}

.current-operand {
    color: var(--text-color);
    font-size: 2.5rem;
    font-weight: 500;
    word-wrap: break-word;
    word-break: break-all;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.calc-btn {
    border: none;
    border-radius: var(--border-radius);
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-light);
    color: var(--text-color);
    box-shadow: 0 2px 5px var(--shadow-color);
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.calc-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px var(--shadow-color);
}

.calc-btn.number {
    background: var(--bg-color);
    color: var(--text-color);
}

.calc-btn.operator {
    background: var(--primary-color);
    color: white;
}

.calc-btn.function {
    background: var(--bg-light);
    color: var(--text-color);
}

.calc-btn.equals {
    background: var(--primary-color);
    color: white;
    grid-row: span 2;
}

.calculator-history {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.calculator-history h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.history-item {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.history-item:hover {
    background-color: var(--bg-color);
}

.history-calculation {
    color: var(--text-color);
    font-size: 0.9rem;
}

.history-timestamp {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* Responsive Calculator Styles */
@media (max-width: 992px) {
    .calculator-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .calculator-buttons {
        gap: 8px;
    }
    
    .calc-btn {
        padding: 12px;
        font-size: 1.1rem;
    }
    
    .calculator-history {
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .calculator-container {
        padding: 15px;
    }
    
    .calculator-display {
        padding: 15px;
        min-height: 80px;
    }
    
    .current-operand {
        font-size: 2rem;
    }
    
    .previous-operand {
        font-size: 1rem;
    }
    
    .calc-btn {
        padding: 10px;
        font-size: 1rem;
    }
    
    .calculator-history h3 {
        font-size: 1rem;
    }
    
    .history-calculation {
        font-size: 0.85rem;
    }
    
    .history-timestamp {
        font-size: 0.75rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .calc-btn:hover {
        transform: none;
        box-shadow: 0 2px 5px var(--shadow-color);
    }
    
    .calc-btn:active {
        background-color: var(--primary-color);
        color: white;
    }
}

/* Landscape Mode Optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .calculator-container {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .calculator-history {
        max-height: 150px;
    }
}

/* Navigation Responsive Styles */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: center;
        padding: 20px;
        box-shadow: 0 5px 15px var(--shadow-color);
        border-radius: var(--border-radius);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: var(--transition);
    }
    
    .nav-links.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Hero Section Responsive Styles */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 40px 0;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

/* Tools Grid Responsive Styles */
@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tool-card {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .tool-card {
        padding: 15px;
    }
    
    .tool-icon {
        font-size: 2rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .tool-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Landscape Mode Optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 20px 0;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tool Content Responsive Styles */
@media (max-width: 992px) {
    .tool-content-section {
        padding: 40px 0;
    }
    
    .tool-container {
        padding: 20px;
    }
    
    .about-content {
        flex-direction: column-reverse;
        gap: 30px;
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-container {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .tool-content h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .task-options {
        flex-direction: column;
    }
    
    .task-filters {
        flex-wrap: wrap;
    }
    
    .sort-options {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 8px 12px;
    }
    
    .btn {
        padding: 10px 20px;
    }
}

@media (max-width: 576px) {
    .tool-content h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .tool-container {
        padding: 15px;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 0.9rem;
    }
    
    .btn {
        width: 100%;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Form Responsive Styles */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-group input,
    .input-group select {
        width: 100%;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .option {
        width: 100%;
    }
}

/* Table Responsive Styles */
@media (max-width: 768px) {
    .history-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .history-table th,
    .history-table td {
        padding: 8px;
        font-size: 0.9rem;
    }
}

/* Toast Notification Responsive Styles */
@media (max-width: 576px) {
    .toast {
        left: 15px;
        right: 15px;
        bottom: 15px;
        min-width: auto;
        max-width: none;
    }
    
    .toast-content {
        flex-direction: column;
        text-align: center;
    }
    
    .toast-content i {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Legal Content Styles */
.legal-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.legal-content h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
    text-align: center;
}

.last-updated {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 40px;
}

.legal-section {
    margin-bottom: 30px;
}

.legal-section h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.legal-section p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
}

.legal-section ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.legal-section li {
    color: var(--text-color);
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Dark Theme Legal Content */
body.dark-theme .legal-content {
    background-color: var(--bg-color);
    box-shadow: 0 5px 15px var(--shadow-color);
}

body.dark-theme .legal-section h2 {
    border-bottom-color: var(--border-color);
}

/* Responsive Legal Content */
@media (max-width: 768px) {
    .legal-content {
        margin: 20px;
        padding: 15px;
    }

    .legal-content h1 {
        font-size: 2rem;
    }

    .legal-section h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .legal-content {
        margin: 15px;
        padding: 10px;
    }

    .legal-content h1 {
        font-size: 1.8rem;
    }

    .legal-section h2 {
        font-size: 1.2rem;
    }

    .legal-section p,
    .legal-section li {
        font-size: 0.95rem;
    }
} 