/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
}

.website-title {
    cursor: pointer;
    transition: all 0.3s ease;
}

.website-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4f46e5;
    margin: 0;
}

.tagline {
    font-size: 0.75rem;
    color: #6b7280;
    display: block;
    margin-top: 0.25rem;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px; /* Touch-friendly minimum height */
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}


/* Main Content */
.main {
    padding: 2rem 0;
}

.tool-section {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

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

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tool-header h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1f2937;
}

.fullscreen-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.fullscreen-btn:hover {
    background: #4f46e5;
    color: white;
}

/* Timer Display */
.timer-display {
    text-align: center;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circular-timer {
    position: relative;
    display: inline-block;
}

.progress-ring {
    transform: rotate(-90deg);
    transition: all 0.3s ease;
}

.progress-ring-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: #4f46e5;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 565.48; /* 2 * π * 90 */
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
}

.timer-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.time {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
    line-height: 1;
}

.milliseconds {
    font-size: 2rem;
    color: #6b7280;
    font-weight: 300;
    margin-top: -0.5rem;
}

/* Phase Colors */
.phase-work .progress-ring-fill {
    stroke: #3b82f6; /* Blue */
}

.phase-rest .progress-ring-fill {
    stroke: #10b981; /* Green */
}

.phase-break .progress-ring-fill {
    stroke: #ef4444; /* Red */
}

.phase-work {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
}

.phase-rest {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
}

.phase-break {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
}

/* Animated transitions */
.tool-section {
    transition: background 0.5s ease;
}

.date {
    font-size: 1.25rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Time Input */
.time-input {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.time-input input {
    width: 80px;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 500;
    background: white;
}

.time-input input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.time-input span {
    font-size: 1.5rem;
    font-weight: 500;
    color: #6b7280;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 1rem 0;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 100px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.btn:disabled::before {
    display: none;
}

.btn:active:not(:disabled) {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);
}

/* Start Button - Green with pulse animation */
.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 4px 20px 0 rgba(16, 185, 129, 0.5); }
    100% { box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.3); }
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px 0 rgba(16, 185, 129, 0.4);
}

/* Stop Button - Red with warning pulse */
.btn-secondary {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 4px 20px 0 rgba(239, 68, 68, 0.5); }
    100% { box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.3); }
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px 0 rgba(239, 68, 68, 0.4);
}

/* Reset Button - Gray with subtle glow */
.btn-tertiary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.btn-tertiary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px 0 rgba(107, 114, 128, 0.4);
}

/* Split/Lap Button - Orange with energetic pulse */
.btn-accent {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    animation: pulse-orange 1.5s infinite;
}

@keyframes pulse-orange {
    0% { box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 4px 20px 0 rgba(245, 158, 11, 0.5); }
    100% { box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.3); }
}

.btn-accent:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px 0 rgba(245, 158, 11, 0.4);
}

/* Danger Button - Red for destructive actions */
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: 2px solid #dc2626;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px 0 rgba(239, 68, 68, 0.4);
}

.btn-danger:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px 0 rgba(239, 68, 68, 0.3);
}

/* Special button states for running timers */
.btn.running {
    animation: running-glow 1s infinite alternate;
}

@keyframes running-glow {
    0% { box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.4); }
    100% { box-shadow: 0 4px 20px 0 rgba(16, 185, 129, 0.8); }
}

.btn.paused {
    animation: paused-pulse 2s infinite;
}

@keyframes paused-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Splits and Laps */
.splits-container, .laps-container {
    margin-top: 2rem;
}

.splits-container h3, .laps-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.splits-list, .laps-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.split-item, .lap-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-variant-numeric: tabular-nums;
}

.split-item:last-child, .lap-item:last-child {
    border-bottom: none;
}

.split-number, .lap-number {
    font-weight: 600;
    color: #4f46e5;
}

.split-time, .lap-time {
    font-weight: 500;
    color: #1f2937;
}

/* Fullscreen Mode */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #1f2937;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.fullscreen-overlay.active {
    display: flex;
}

.fullscreen-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fullscreen-content {
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

.fullscreen-time {
    font-size: 8rem;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.fullscreen-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.fullscreen-controls .btn {
    font-size: 1.25rem;
    padding: 1rem 2rem;
}

/* Shortcuts Help */
.shortcuts-help {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
}

.shortcuts-help kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
}

/* Tabs Styles */
.routine-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

.tab-btn:hover {
    color: #4f46e5;
}

.tab-content {
    display: none;
}

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

/* Routine Builder Styles */
.routine-builder {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
}

.routine-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.routine-header input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.steps-list {
    margin-bottom: 1.5rem;
}

.step-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
}

.step-name {
    flex: 2;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.step-duration {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-align: center;
}

.remove-step {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.routine-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.saved-routines {
    min-height: 200px;
}

.routine-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.routine-card h4 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.routine-steps {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.routine-card-actions {
    display: flex;
    gap: 0.5rem;
}

.routine-card-actions button {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: #4f46e5;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-step {
    font-size: 1rem;
    color: #4f46e5;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Clock Settings */
.clock-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

/* Alarm Enhancements */
.next-alarm-countdown {
    font-size: 1rem;
    color: #f59e0b;
    font-weight: 500;
    margin-top: 0.5rem;
}

.day-selector {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.day-btn {
    padding: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

.day-btn.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.day-btn:hover {
    border-color: #4f46e5;
}

.alarms-list {
    margin-top: 2rem;
}

.alarms-list h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.alarms-container {
    max-height: 300px;
    overflow-y: auto;
}

.alarm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.alarm-info {
    flex: 1;
}

.alarm-time {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.alarm-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.alarm-days {
    font-size: 0.75rem;
    color: #4f46e5;
    margin-top: 0.25rem;
}

.alarm-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.alarm-toggle {
    width: 50px;
    height: 26px;
    border-radius: 13px;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    background: #d1d5db;
}

.alarm-toggle.active {
    background: #10b981;
}

.alarm-toggle::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
}

.alarm-toggle.active::after {
    transform: translateX(24px);
}

.delete-alarm {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

/* Customization Panel */
.customize-btn {
    position: fixed;
    bottom: 80px;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #4f46e5;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

.customize-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.customization-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

.customization-panel.open {
    right: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.panel-header h3 {
    margin: 0;
    color: #1f2937;
}

.panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: 6px;
}

.panel-close:hover {
    background: #e5e7eb;
}

.panel-content {
    padding: 1.5rem;
}

.color-section {
    margin-bottom: 2rem;
}

.color-section h4 {
    margin-bottom: 1rem;
    color: #1f2937;
    font-size: 1.125rem;
}

.color-group {
    margin-bottom: 1rem;
}

.color-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.color-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
}

.color-group input[type="url"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.color-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.panel-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

.panel-actions .btn {
    width: 100%;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* Keyboard Shortcuts Overlay */
.shortcuts-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    backdrop-filter: blur(4px);
}

.shortcuts-overlay.active {
    display: flex;
}

.shortcuts-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.shortcuts-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
}

.shortcuts-close {
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shortcuts-close:hover {
    background: #e5e7eb;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #4f46e5;
}

.shortcut-item kbd {
    background: #1f2937;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.shortcut-item span {
    color: #374151;
    font-weight: 500;
}

/* Responsive shortcuts */
@media (max-width: 480px) {
    .shortcuts-content {
        padding: 1.5rem;
    }
    
    .shortcut-item {
        padding: 0.5rem;
        gap: 0.75rem;
    }
    
    .shortcut-item kbd {
        min-width: 35px;
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Interval Timer Styles */
.interval-settings, .alarm-settings, .metronome-settings, .chess-setup {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-weight: 500;
    color: #374151;
}

.setting-group input, .setting-group select {
    padding: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.setting-group input:focus, .setting-group select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.interval-status {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4f46e5;
    margin-top: 0.5rem;
}

.interval-progress {
    text-align: center;
    margin-top: 1rem;
}

.round-counter {
    font-size: 1.125rem;
    font-weight: 500;
    color: #6b7280;
}

/* Alarm Clock Styles */
.alarm-status {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 500;
    margin-top: 1rem;
}

.alarm-status.active {
    background: #fef3c7;
    color: #d97706;
}

/* Metronome Styles */
.bpm-display {
    font-size: 3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.beat-indicator {
    font-size: 4rem;
    color: #4f46e5;
    animation: none;
}

.beat-indicator.beat {
    animation: beat 0.2s ease-in-out;
}

@keyframes beat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.metronome-settings .setting-group {
    align-items: center;
}

#bpm-slider {
    width: 100%;
    margin: 0.5rem 0;
}

#bpm-input {
    width: 80px;
    text-align: center;
}

/* Chess Clock Styles */
.chess-timers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.chess-player {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.chess-player.active {
    background: #fef3c7;
    border-color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.chess-player h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.chess-time {
    font-size: 3rem;
    font-weight: 300;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
    margin-bottom: 1rem;
}

.chess-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    background: #4f46e5;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.chess-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.chess-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Color-coded sections */
#stopwatch {
    border-left: 4px solid #10b981;
}

#countdown {
    border-left: 4px solid #ef4444;
}

#split-lap {
    border-left: 4px solid #f59e0b;
}

#interval {
    border-left: 4px solid #8b5cf6;
}

#clock {
    border-left: 4px solid #06b6d4;
}

#alarm {
    border-left: 4px solid #f97316;
}

#metronome {
    border-left: 4px solid #ec4899;
}

#chess {
    border-left: 4px solid #6366f1;
}


/* Session Summary Popup */
.session-summary-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.session-summary-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.session-summary-popup {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes slideUp {
    from { 
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    to { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.session-summary-header {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-summary-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.session-summary-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.session-summary-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.session-summary-content {
    padding: 2rem;
}

.session-stats {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #4f46e5;
}

.stat-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 50%;
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.session-message {
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.session-message p {
    margin: 0;
    color: #166534;
    font-weight: 500;
}

.session-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.session-actions .btn {
    flex: 1;
    max-width: 150px;
}

/* Celebration animation */
.session-summary-popup.celebrate {
    animation: celebrate 0.6s ease;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.05); }
    50% { transform: scale(1.02); }
    75% { transform: scale(1.05); }
}

/* Footer Styles */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e5e7eb;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-features span {
    color: #10b981;
    font-size: 0.875rem;
    font-weight: 500;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #4f46e5;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright p {
    color: #9ca3af;
    margin: 0;
    font-size: 0.875rem;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-social span {
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-social a {
    font-size: 1.25rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.footer-social a:hover {
    transform: scale(1.2);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.modal-close:hover {
    background: #e5e7eb;
}

.modal-body {
    padding: 3rem;
}

.modal-body h1 {
    color: #1f2937;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.modal-body h2 {
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
}

.modal-body p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-body ul {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.modal-body a {
    color: #4f46e5;
    text-decoration: none;
}

.modal-body a:hover {
    text-decoration: underline;
}

/* Enhanced Responsive Design */

/* Large Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .circular-timer {
        width: 180px;
        height: 180px;
    }
    
    .progress-ring {
        width: 180px;
        height: 180px;
    }
    
}

/* Tablets (768px - 1024px) */
@media (max-width: 768px) {
    /* Header and Navigation */
    .header {
        padding: 0.75rem 0;
    }
    
    .header .container {
        padding: 0 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .website-title {
        text-align: center;
    }

    .website-title h1 {
        font-size: 1.25rem;
    }

    .tagline {
        font-size: 0.7rem;
    }

    .main-nav {
        width: 100%;
        justify-content: center;
    }

    .nav-buttons {
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        max-width: 100%;
    }

    .nav-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        min-width: auto;
        flex: 1;
        max-width: 120px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Timer Display */
    .timer-display {
        padding: 1.5rem;
    }

    .circular-timer {
        width: 160px;
        height: 160px;
    }
    
    .progress-ring {
        width: 160px;
        height: 160px;
    }

    .time {
        font-size: 2rem;
    }

    .milliseconds {
        font-size: 1rem;
    }

    /* Controls */
    .controls {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .btn {
        min-width: 120px;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Settings Grid */
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Interval Timer Specific */
    .interval-settings {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Splits and Laps */
    .splits-container, .laps-container {
        max-height: 200px;
    }

    /* Fullscreen */
    .fullscreen-time {
        font-size: 4rem;
    }

    .fullscreen-controls .btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }


    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    /* Modals */
    .modal-body {
        padding: 1.5rem;
        max-height: 70vh;
        overflow-y: auto;
    }

    /* Customization Panel */
    .customization-panel {
        width: 100%;
        max-width: none;
        height: 100vh;
        border-radius: 0;
    }

    /* Session Summary */
    .session-summary-popup {
        width: 95%;
        margin: 1rem;
    }

    .session-summary-content {
        padding: 1.5rem;
    }

    .session-actions {
        flex-direction: column;
    }

    .session-actions .btn {
        max-width: none;
    }
}

/* Mobile Landscape (568px - 768px) */
@media (max-width: 568px) and (orientation: landscape) {
    .header {
        padding: 0.5rem 0;
    }
    
    .nav {
        gap: 0.25rem;
    }
    
    .nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .timer-display {
        padding: 1rem;
    }
    
    .circular-timer {
        width: 120px;
        height: 120px;
    }
    
    .progress-ring {
        width: 120px;
        height: 120px;
    }
    
    .time {
        font-size: 1.5rem;
    }
}

/* Mobile Portrait (320px - 568px) */
@media (max-width: 568px) {
    /* Base Layout */
    .container {
        padding: 0 0.75rem;
    }

    /* Header */
    .header {
        padding: 0.75rem 0;
    }

    .header .container {
        padding: 0 0.75rem;
    }

    .header-content {
        gap: 1rem;
    }

    .website-title h1 {
        font-size: 1.2rem;
    }

    .tagline {
        font-size: 0.7rem;
    }

    .nav-buttons {
        gap: 0.4rem;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    .nav-btn {
        padding: 0.65rem 0.8rem;
        font-size: 0.75rem;
        border-radius: 10px;
        min-width: 85px;
        max-width: 110px;
        flex: 0 1 auto;
        text-align: center;
        line-height: 1.2;
    }

    /* Arrange buttons in 2 rows: 4 on top, 2 on bottom */
    .nav-buttons {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: auto auto;
        gap: 0.4rem;
        width: 100%;
        max-width: 100%;
    }

    /* First 4 buttons in top row */
    .nav-btn:nth-child(1),
    .nav-btn:nth-child(2),
    .nav-btn:nth-child(3),
    .nav-btn:nth-child(4) {
        grid-row: 1;
    }

    /* Last 2 buttons in bottom row, centered */
    .nav-btn:nth-child(5),
    .nav-btn:nth-child(6) {
        grid-row: 2;
        grid-column: 2 / 4;
    }

    .nav-btn:nth-child(5) {
        grid-column: 2 / 3;
    }

    .nav-btn:nth-child(6) {
        grid-column: 3 / 4;
    }

    /* Tool Sections */
    .tool-section {
        padding: 1rem;
        border-radius: 12px;
    }

    .tool-header {
        margin-bottom: 1rem;
    }

    .tool-header h2 {
        font-size: 1.5rem;
    }

    /* Timer Display */
    .timer-display {
        padding: 1rem;
    }

    .circular-timer {
        width: 140px;
        height: 140px;
    }
    
    .progress-ring {
        width: 140px;
        height: 140px;
    }

    .time {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .milliseconds {
        font-size: 0.875rem;
        margin-top: 0.25rem;
    }

    /* Controls */
    .controls {
        flex-direction: column;
        gap: 0.75rem;
        margin: 1.5rem 0;
    }

    .btn {
        width: 100%;
        max-width: none;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        border-radius: 10px;
    }

    /* Settings */
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .setting-group label {
        font-size: 0.875rem;
    }

    .setting-group input,
    .setting-group select {
        padding: 0.75rem;
        font-size: 1rem;
    }

    /* Interval Timer */
    .interval-settings {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .status-display {
        padding: 1rem;
        text-align: center;
    }

    .status-display h3 {
        font-size: 1rem;
    }

    .status-display p {
        font-size: 0.875rem;
    }

    /* Splits and Laps */
    .splits-container, .laps-container {
        margin-top: 1.5rem;
        max-height: 150px;
    }

    .splits-list, .laps-list {
        max-height: 120px;
    }

    .split-item, .lap-item {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    /* Alarms */
    .alarm-item {
        padding: 0.75rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .alarm-time {
        font-size: 1.25rem;
    }

    .alarm-days {
        justify-content: center;
    }

    .day-btn {
        width: 35px;
        height: 35px;
        font-size: 0.75rem;
    }

    /* Chess Clock */
    .chess-players {
        flex-direction: column;
        gap: 1rem;
    }

    .chess-player {
        padding: 1.5rem;
    }

    .chess-time {
        font-size: 2rem;
    }

    /* Fullscreen */
    .fullscreen-time {
        font-size: 3rem;
    }

    .fullscreen-controls {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .fullscreen-controls .btn {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    /* Modals and Popups */
    .modal-body {
        padding: 1rem;
        max-height: 80vh;
    }

    .shortcuts-overlay {
        padding: 1rem;
    }

    .shortcuts-popup {
        width: 95%;
        max-height: 85vh;
    }

    .shortcuts-content {
        padding: 1rem;
    }

    .shortcut-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .shortcut-item kbd {
        align-self: flex-start;
    }

    /* Customization Panel */
    .customization-panel {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        top: 0;
        right: 0;
        transform: translateX(100%);
    }

    .customization-panel.active {
        transform: translateX(0);
    }

    .panel-content {
        padding: 1rem;
    }

    /* Session Summary */
    .session-summary-popup {
        width: 95%;
        max-width: none;
        margin: 0.5rem;
    }

    .session-summary-header {
        padding: 1rem;
    }

    .session-summary-header h3 {
        font-size: 1.25rem;
    }

    .session-summary-content {
        padding: 1rem;
    }

    .stat-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .session-actions {
        flex-direction: column;
        gap: 0.75rem;
    }



    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
        margin-top: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

}

/* Small Mobile (320px and below) */
@media (max-width: 320px) {
    .header {
        padding: 0.4rem 0;
    }

    .header .container {
        padding: 0 0.5rem;
    }

    .header-content {
        gap: 0.5rem;
    }

    .website-title h1 {
        font-size: 1rem;
    }

    .tagline {
        font-size: 0.6rem;
    }

    .nav-buttons {
        gap: 0.2rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.65rem;
        max-width: 65px;
        min-width: 55px;
        border-radius: 6px;
        line-height: 1.1;
    }

    /* Stack navigation in two rows if needed */
    .nav-buttons {
        max-width: 100%;
        justify-content: space-around;
    }

    .circular-timer {
        width: 120px;
        height: 120px;
    }
    
    .progress-ring {
        width: 120px;
        height: 120px;
    }

    .time {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .session-summary-popup {
        width: 98%;
        margin: 0.25rem;
    }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        touch-action: manipulation;
    }

    .nav-btn {
        min-height: 40px;
        touch-action: manipulation;
    }

    .day-btn {
        min-width: 40px;
        min-height: 40px;
        touch-action: manipulation;
    }

    /* Increase tap targets */
    .fullscreen-btn,
    .session-summary-close,
    .customize-btn {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }

    /* Remove hover effects on touch devices */
    .btn:hover,
    .nav-btn:hover {
        transform: none;
    }

    /* Enhanced touch feedback */
    .btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }

    .nav-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Mobile-specific enhancements */
.mobile-device {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.mobile-device .btn,
.mobile-device .nav-btn {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Reduced animations for low-end devices */
.reduced-animations * {
    animation-duration: 0.1s !important;
    transition-duration: 0.1s !important;
}

.reduced-animations .btn::before {
    display: none;
}

/* Orientation-specific styles */
.landscape .header {
    padding: 0.5rem 0;
}

.landscape .nav {
    gap: 0.5rem;
}

.landscape .timer-display {
    padding: 1rem;
}

.portrait .controls {
    flex-direction: column;
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .tool-section {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix for iOS Safari viewport units */
    .fullscreen {
        height: -webkit-fill-available;
    }
    
    /* Fix for iOS Safari input zoom */
    input[type="number"],
    input[type="text"],
    select {
        font-size: 16px;
    }
}

/* Android specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .btn {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 12px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .circular-timer {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility improvements for mobile */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .btn::before {
        display: none;
    }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) {
    .mobile-device {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .mobile-device .tool-section {
        background-color: #2d2d2d;
        border-color: #404040;
    }
    
    .mobile-device .btn {
        border-color: #404040;
    }
}

/* Clickable Logo Styles */
.clickable-logo {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.clickable-logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(79, 70, 229, 0.5);
}

.clickable-logo:active {
    transform: scale(0.95);
}

/* Categories Page Overlay */
.categories-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.website-title {
    cursor: pointer;
    transition: transform 0.2s ease;
    user-select: none;
}

.website-title:hover {
    transform: scale(1.05);
}

.website-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(45deg, #ffffff, #f0f9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 400;
    display: block;
    margin-top: 0.25rem;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.categories-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(50px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.categories-overlay.active .categories-container {
    transform: scale(1) translateY(0);
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.categories-header h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.categories-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.categories-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(90deg);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.category-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }
.category-card:nth-child(7) { animation-delay: 0.7s; }
.category-card:nth-child(8) { animation-delay: 0.8s; }
.category-card:nth-child(9) { animation-delay: 0.9s; }

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

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(79, 70, 229, 0.3);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    text-align: center;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.category-card h3 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.category-card p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

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

.tool-tag {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}

.tool-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.4);
}

/* Active tools - Green gradient */
.tool-tag.active-tool {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
}

.tool-tag.active-tool::before {
    content: '✓';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    background: #059669;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.tool-tag.active-tool:hover {
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.5);
    transform: scale(1.1);
}

.tool-tag.active-tool:active {
    transform: scale(0.95);
}

/* Coming soon tools - Orange gradient */
.tool-tag.coming-tool {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    position: relative;
}

.tool-tag.coming-tool::before {
    content: '⏳';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    background: #d97706;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.tool-tag.coming-tool:hover {
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

.category-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.status-badge.coming-soon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.tool-count {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.categories-footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.categories-footer p {
    color: white;
    font-size: 1.1rem;
    margin: 0 0 1.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.categories-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.categories-actions .btn {
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Mobile Responsive for Categories */
@media (max-width: 768px) {
    .categories-container {
        width: 98%;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .categories-header {
        padding: 1.5rem;
    }
    
    .categories-header h2 {
        font-size: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .categories-footer {
        padding: 1.5rem;
    }
    
    .categories-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .categories-actions .btn {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .category-icon {
        font-size: 2.5rem;
    }
    
    .category-card h3 {
        font-size: 1.25rem;
    }
}

/* Custom Notification Styles */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    z-index: 10001;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 350px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.custom-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.notification-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Mobile notification adjustments */
@media (max-width: 480px) {
    .custom-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .custom-notification.show {
        transform: translateY(0);
    }
}

/* New Time & Date Tools Styles */

/* Pomodoro Timer Styles */
.pomodoro-phase {
    font-size: 1rem;
    color: #6b7280;
    margin-top: 0.5rem;
    text-align: center;
}

.pomodoro-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

/* World Clock Styles */
.world-clocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.world-clock-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    position: relative;
}

.clock-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.clock-time {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
}

.clock-timezone {
    font-size: 0.875rem;
    opacity: 0.8;
}

.remove-clock {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
}

/* Timezone Converter Styles */
.converter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1.5rem 0;
}

.converter-section {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.converter-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.converter-section select,
.converter-section input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.converted-time {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

/* Date Calculator Styles */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1.5rem 0;
}

.calc-section {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.calc-section h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
}

.calc-controls {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.calc-controls select,
.calc-controls input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.result {
    margin-top: 1rem;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    font-weight: 500;
}

/* Age Calculator Styles */
.age-calculator-content {
    margin: 1.5rem 0;
}

.input-section {
    text-align: center;
    margin-bottom: 2rem;
}

.input-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-section input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin: 0 0.5rem;
}

.age-results {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.age-item {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    min-width: 80px;
}

.age-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.age-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.age-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.age-detail {
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Calendar Generator Styles */
.calendar-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.calendar-controls select,
.calendar-controls input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.calendar-display {
    margin: 1.5rem 0;
}

.calendar-header {
    text-align: center;
    margin-bottom: 1rem;
}

.calendar-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #1f2937;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day-header {
    background: #4f46e5;
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.calendar-day {
    background: white;
    padding: 0.75rem;
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day.other-month {
    background: #f9fafb;
    color: #9ca3af;
}

.calendar-day.today {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

/* Working Days Calculator Styles */
.working-days-content {
    margin: 1.5rem 0;
}

.weekend-options {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    justify-content: center;
}

.weekend-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.working-days-result {
    margin-top: 1.5rem;
}

.result-item {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: #f3f4f6;
    border-radius: 8px;
    text-align: center;
}

/* Time Difference Calculator Styles */
.time-diff-content {
    margin: 1.5rem 0;
}

.time-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.time-section {
    text-align: center;
}

.time-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.time-section input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.time-diff-breakdown {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.diff-item {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 12px;
    min-width: 60px;
}

.diff-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.diff-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.total-time {
    text-align: center;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 1.1rem;
}

/* Unit & Measurement Converter Styles */
.converter-interface {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.converter-input,
.converter-output {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.converter-input input,
.converter-input select,
.converter-output select {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.converter-input input:focus,
.converter-input select:focus,
.converter-output select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.converter-arrow {
    font-size: 2rem;
    color: #4f46e5;
    font-weight: bold;
    text-align: center;
    min-width: 40px;
}

.result-value {
    padding: 1rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    font-family: 'Courier New', monospace;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-all;
}

.currency-note {
    text-align: center;
    margin-top: 1rem;
    color: #6b7280;
    font-style: italic;
}

/* Converter-specific styling */
#temperature-result {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

#speed-result {
    background: linear-gradient(135deg, #10b981, #059669);
}

#currency-result {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

#datasize-result {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

#energy-result {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

#pressure-result {
    background: linear-gradient(135deg, #84cc16, #65a30d);
}

/* Math & Number Tools Styles */

/* Scientific Calculator */
.calculator-display {
    margin: 2rem 0;
}

.calc-screen {
    background: #1f2937;
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.calc-history {
    font-size: 0.875rem;
    color: #9ca3af;
    min-height: 1.5rem;
    text-align: right;
}

.calc-input {
    font-size: 2rem;
    font-weight: 600;
    text-align: right;
    font-family: 'Courier New', monospace;
    min-height: 2.5rem;
}

.calculator-buttons {
    display: grid;
    gap: 0.5rem;
}

.calc-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.calc-btn {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.num-btn {
    background: #f3f4f6;
    color: #1f2937;
}

.num-btn:hover {
    background: #e5e7eb;
}

.op-btn {
    background: #4f46e5;
    color: white;
}

.op-btn:hover {
    background: #4338ca;
}

.func-btn {
    background: #6b7280;
    color: white;
}

.func-btn:hover {
    background: #4b5563;
}

.equals-btn {
    background: #059669;
    grid-row: span 2;
}

.equals-btn:hover {
    background: #047857;
}

.zero-btn {
    grid-column: span 2;
}

/* Percentage Calculator */
.percentage-calculators {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.perc-calc-section {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.perc-calc-section h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
}

.perc-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.perc-inputs input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    width: 120px;
}

.perc-inputs span {
    font-weight: 500;
    color: #4b5563;
}

.perc-result {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    min-width: 80px;
    text-align: center;
}

/* Fraction Calculator */
.fraction-calculator {
    margin: 2rem 0;
}

.fraction-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.fraction-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.fraction-input input {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
}

.fraction-line {
    width: 80px;
    height: 2px;
    background: #4b5563;
}

.fraction-result {
    padding: 1rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-radius: 12px;
    text-align: center;
}

.result-fraction {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

#frac-operation {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Square Root Calculator */
.sqrt-calculator {
    margin: 2rem 0;
}

.sqrt-input-section {
    text-align: center;
    margin-bottom: 2rem;
}

.sqrt-input-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.sqrt-input-section input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    margin: 0 0.5rem;
    width: 200px;
}

.sqrt-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sqrt-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.sqrt-label {
    font-weight: 500;
    color: #4b5563;
}

.sqrt-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #1f2937;
    font-size: 1.1rem;
}

/* Number Base Converter */
.base-converter {
    margin: 2rem 0;
}

.base-input-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.base-input-section label {
    font-weight: 500;
}

.base-input-section input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    width: 150px;
}

.base-input-section select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.base-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.base-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 8px;
}

.base-label {
    font-weight: 500;
}

.base-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Random Number Generator */
.random-generator {
    margin: 2rem 0;
}

.random-controls {
    text-align: center;
    margin-bottom: 2rem;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.range-inputs label {
    font-weight: 500;
}

.range-inputs input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    width: 100px;
}

.random-results {
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.random-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    min-height: 60px;
    align-items: center;
}

.random-number {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Additional Math Tools Styles */

/* Exponent Calculator */
.exponent-calculator {
    margin: 2rem 0;
}

.exponent-input-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.exponent-input-section input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    width: 120px;
}

.exponent-result {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-radius: 12px;
}

.exp-display {
    font-size: 2rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Logarithm Calculator */
.logarithm-calculator {
    margin: 2rem 0;
}

.log-input-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.log-input-section input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    width: 120px;
}

.log-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.log-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    border-radius: 8px;
}

.log-label {
    font-weight: 500;
}

.log-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Trigonometry Calculator */
.trigonometry-calculator {
    margin: 2rem 0;
}

.trig-input-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.trig-input-section input,
.trig-input-section select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.trig-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.trig-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 8px;
}

.trig-label {
    font-weight: 500;
    font-size: 1.1rem;
}

.trig-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Statistics Calculator */
.statistics-calculator {
    margin: 2rem 0;
}

.stats-input-section {
    text-align: center;
    margin-bottom: 2rem;
}

.stats-input-section textarea {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 8px;
}

.stat-label {
    font-weight: 500;
}

.stat-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Matrix Calculator */
.matrix-calculator {
    margin: 2rem 0;
}

.matrix-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.matrix-controls select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.matrix-grid {
    display: grid;
    gap: 0.5rem;
    margin: 2rem 0;
    justify-content: center;
}

.matrix-cell {
    width: 60px;
    height: 60px;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
}

.matrix-result {
    padding: 2rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 12px;
    text-align: center;
    font-family: 'Courier New', monospace;
    white-space: pre-line;
}

/* Prime Number Checker */
.prime-checker {
    margin: 2rem 0;
}

.prime-input-section {
    text-align: center;
    margin-bottom: 2rem;
}

.prime-input-section input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    width: 200px;
    margin: 0 0.5rem;
}

.prime-result {
    text-align: center;
}

.prime-status {
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.prime-status.is-prime {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.prime-status.not-prime {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.prime-factors {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* GCD/LCM Calculator */
.gcd-lcm-calculator {
    margin: 2rem 0;
}

.gcd-input-section {
    text-align: center;
    margin-bottom: 2rem;
}

.gcd-input-section input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    width: 200px;
    margin: 0 0.5rem;
}

.gcd-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gcd-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-radius: 8px;
}

.gcd-label {
    font-weight: 500;
}

.gcd-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Factorial Calculator */
.factorial-calculator {
    margin: 2rem 0;
}

.factorial-input-section {
    text-align: center;
    margin-bottom: 2rem;
}

.factorial-input-section input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    width: 150px;
    margin: 0 0.5rem;
}

.factorial-result {
    text-align: center;
}

.factorial-display {
    padding: 2rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 12px;
    font-size: 2rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    margin-bottom: 1rem;
}

.factorial-steps {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-family: 'Courier New', monospace;
}

/* Fibonacci Generator */
.fibonacci-generator {
    margin: 2rem 0;
}

.fibonacci-controls {
    text-align: center;
    margin-bottom: 2rem;
}

.fibonacci-controls input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    width: 100px;
    margin: 0 0.5rem;
}

.fibonacci-result {
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.fibonacci-sequence {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    min-height: 60px;
    align-items: center;
}

.fibonacci-number {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.fibonacci-number:hover {
    transform: scale(1.05);
}

/* Productivity & Focus Tools Styles */

/* Focus Timer */
.focus-timer-display {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.focus-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.focus-settings {
    text-align: center;
    margin: 2rem 0;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.setting-item label {
    font-weight: 500;
    color: #374151;
}

.setting-item select {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 1rem;
}

.focus-circular-timer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.focus-progress-ring {
    transform: rotate(-90deg);
}

.focus-progress-ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 8;
}

.focus-progress-ring-fill {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 628;
    stroke-dashoffset: 628;
    transition: stroke-dashoffset 1s ease;
}

.focus-timer-content {
    position: absolute;
    text-align: center;
}

.focus-time {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1f2937;
}

.focus-mode {
    font-size: 1rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* To-Do List */
.todo-manager {
    max-width: 800px;
    margin: 0 auto;
}

.todo-input-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.todo-input-section input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.todo-input-section select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
}

.todo-stats {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    color: #6b7280;
}

.todo-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.todo-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.todo-text {
    flex: 1;
}

.todo-priority {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-high {
    background: #fef2f2;
    color: #dc2626;
}

.priority-medium {
    background: #fef3c7;
    color: #d97706;
}

.priority-low {
    background: #f0fdf4;
    color: #16a34a;
}

/* Enhanced Button Styles for Productivity Tools */
.productivity-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.productivity-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

.productivity-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Motivation Controls */
.motivation-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.motivation-controls .btn {
    min-width: 120px;
}

/* Water Reminder */
.water-bottle {
    width: 100px;
    height: 200px;
    border: 3px solid #3b82f6;
    border-radius: 0 0 50px 50px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.water-level {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #06b6d4, #0891b2);
    transition: height 0.3s ease;
    border-radius: 0 0 47px 47px;
}

.water-amount {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: #1f2937;
    text-shadow: 0 0 4px rgba(255,255,255,0.8);
}

/* Quote Card */
.quote-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
}

.quote-text {
    font-size: 1.25rem;
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.quote-author {
    font-weight: 600;
    opacity: 0.9;
}

/* Habit Tracker */
.habit-manager {
    max-width: 800px;
    margin: 0 auto;
}

.habit-input-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.habit-input-section input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.habit-input-section select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
}

.habits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.habit-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.habit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.habit-card h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
}

.habit-stats {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Water Reminder */
.water-tracker {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.water-progress {
    margin: 2rem 0;
}

.water-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.water-settings {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.water-settings label {
    display: block;
    margin: 1rem 0 0.5rem 0;
    font-weight: 500;
    color: #374151;
}

.water-settings input {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    width: 100px;
    margin: 0 0.5rem;
}

/* Screen Time Tracker */
.screen-time-display {
    max-width: 600px;
    margin: 0 auto;
}

.screen-time-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.screen-time-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.screen-time-settings {
    text-align: center;
    margin: 2rem 0;
}

.screen-time-settings label {
    display: inline-block;
    margin-right: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.screen-time-settings input {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    width: 80px;
}

/* Eye Break Reminder */
.eye-break-tracker {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.eye-break-display {
    margin: 2rem 0;
}

.break-timer {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.next-break-time {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.break-type {
    font-size: 1rem;
    opacity: 0.9;
}

.eye-break-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.eye-break-settings {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.eye-break-settings label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.eye-break-settings select {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    width: 100%;
    max-width: 300px;
}

.break-stats {
    margin: 2rem 0;
    padding: 1rem;
    background: #f0fdf4;
    border-radius: 8px;
    color: #16a34a;
    font-weight: 500;
}

/* Reminder and Goal Tools */
.reminder-manager,
.goal-manager,
.countdown-manager {
    max-width: 600px;
    margin: 0 auto;
}

.reminder-input-section,
.goal-input-section,
.countdown-input-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
}

.reminder-input-section input,
.goal-input-section input,
.countdown-input-section input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.reminders-list,
.goals-grid,
.events-grid {
    min-height: 200px;
    padding: 1rem;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Saved Quotes */
.saved-quotes {
    margin-top: 2rem;
}

.saved-quotes h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: #374151;
}

.saved-quotes-list {
    max-height: 300px;
    overflow-y: auto;
}

.saved-quote-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.saved-quote-item .quote-text {
    font-style: italic;
    margin-bottom: 0.5rem;
    color: #374151;
}

.saved-quote-item .quote-author {
    font-size: 0.875rem;
    color: #6b7280;
}

.delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.delete-btn:hover {
    background: #dc2626;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 2rem;
}

/* Text & Writing Tools Styles */

/* Common Text Tool Styles */
.text-input-section,
.text-output-section {
    margin: 1.5rem 0;
}

.text-input-section textarea,
.text-output-section textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.text-input-section textarea:focus,
.text-output-section textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Word Counter */
.text-analyzer {
    max-width: 1000px;
    margin: 0 auto;
}

.text-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Character Counter */
.char-analyzer {
    max-width: 800px;
    margin: 0 auto;
}

.char-stats {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.char-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.char-stat-item:last-child {
    border-bottom: none;
}

.char-label {
    font-weight: 500;
    color: #374151;
}

.char-value {
    font-weight: 600;
    color: #1f2937;
    font-family: 'Courier New', monospace;
}

.char-limit-checker {
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.char-limit-checker label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.char-limit-checker input {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    width: 120px;
    margin-bottom: 0.5rem;
}

.limit-status {
    font-weight: 500;
    color: #10b981;
}

.limit-status.over-limit {
    color: #ef4444;
}

/* Case Converter */
.case-converter {
    max-width: 800px;
    margin: 0 auto;
}

.case-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.case-buttons .btn {
    padding: 0.75rem 1rem;
    font-weight: 500;
    text-align: center;
}

/* Text Reverser */
.text-reverser {
    max-width: 800px;
    margin: 0 auto;
}

.reverse-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

/* Line Break Remover */
.line-break-remover {
    max-width: 800px;
    margin: 0 auto;
}

.linebreak-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

/* Text to Speech */
.tts-converter {
    max-width: 800px;
    margin: 0 auto;
}

.tts-controls {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.tts-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-weight: 500;
    color: #374151;
}

.setting-group select,
.setting-group input[type="range"] {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
}

.setting-group input[type="range"] {
    padding: 0;
}

.setting-group span {
    font-weight: 600;
    color: #1f2937;
    font-family: 'Courier New', monospace;
}

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

/* Speech to Text */
.stt-converter {
    max-width: 800px;
    margin: 0 auto;
}

.stt-controls {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
}

.stt-settings {
    margin-bottom: 2rem;
}

.stt-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.recording-status {
    padding: 1rem;
    background: #e0f2fe;
    border-radius: 8px;
    color: #0369a1;
    font-weight: 500;
    margin: 1rem 0;
}

/* Lorem Ipsum Generator */
.lorem-generator {
    max-width: 800px;
    margin: 0 auto;
}

.lorem-settings {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.lorem-settings .setting-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lorem-settings label {
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.lorem-settings select,
.lorem-settings input[type="number"] {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
}

.lorem-settings input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Find & Replace */
.find-replace-tool {
    max-width: 800px;
    margin: 0 auto;
}

.find-replace-controls {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.search-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: #374151;
}

.input-group input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
}

.replace-options {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.replace-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
}

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

.find-results {
    margin-top: 1rem;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 8px;
    color: #0369a1;
    font-weight: 500;
    text-align: center;
}

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

.password-settings {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.password-settings .setting-group {
    margin-bottom: 2rem;
}

.password-settings .setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.password-settings input[type="range"] {
    width: 100%;
    margin: 0.5rem 0;
}

.password-settings span {
    font-weight: 600;
    color: #1f2937;
    font-family: 'Courier New', monospace;
}

.character-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.character-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.character-options label:hover {
    background: #e2e8f0;
}

.password-output {
    margin: 2rem 0;
}

.password-display {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.password-display input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    background: #f8fafc;
}

.password-strength {
    text-align: center;
}

.strength-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.strength-meter {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 4px;
}

.strength-text {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Image & File Tools Styles */

/* Common Upload Area Styles */
.file-upload-section {
    margin: 2rem 0;
}

.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.upload-area:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.upload-area.drag-over {
    border-color: #10b981;
    background: #f0fdf4;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-text h3 {
    margin: 0 0 0.5rem 0;
    color: #374151;
    font-size: 1.25rem;
}

.upload-text p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Image Compressor */
.image-compressor {
    max-width: 1000px;
    margin: 0 auto;
}

.compression-settings {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.compression-results {
    display: none;
    margin: 2rem 0;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.result-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-info h4 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.1rem;
}

.result-info p {
    margin: 0.25rem 0;
    color: #6b7280;
}

.result-info .savings {
    color: #10b981;
    font-weight: 600;
}

/* Image Resizer */
.image-resizer {
    max-width: 1000px;
    margin: 0 auto;
}

.resize-settings {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.dimension-controls {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 2rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.preset-sizes {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.resize-preview {
    display: none;
    margin: 2rem 0;
}

.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.preview-section {
    text-align: center;
}

.preview-section h4 {
    margin-bottom: 1rem;
    color: #374151;
}

.image-preview {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    background: #f8fafc;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image Cropper */
.image-cropper {
    max-width: 800px;
    margin: 0 auto;
}

.crop-controls {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.aspect-ratios {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.crop-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.crop-canvas-container {
    text-align: center;
    margin: 2rem 0;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    background: #f8fafc;
}

#crop-canvas {
    max-width: 100%;
    height: auto;
}

/* Format Converter */
.format-converter {
    max-width: 800px;
    margin: 0 auto;
}

.conversion-settings {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.format-selection,
.quality-setting {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.format-selection label,
.quality-setting label {
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

/* QR Code Generator */
.qr-generator {
    max-width: 600px;
    margin: 0 auto;
}

.qr-input-section {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.qr-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.qr-output {
    text-align: center;
    margin: 2rem 0;
}

.qr-preview {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-placeholder {
    color: #9ca3af;
    font-style: italic;
}

.qr-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Barcode Generator */
.barcode-generator {
    max-width: 600px;
    margin: 0 auto;
}

.barcode-input-section {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.barcode-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.barcode-output {
    text-align: center;
    margin: 2rem 0;
}

.barcode-preview {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.barcode-placeholder {
    color: #9ca3af;
    font-style: italic;
}

.barcode-actions {
    display: flex;
    justify-content: center;
}

/* PDF Tools */
.pdf-converter,
.pdf-merger,
.pdf-splitter {
    max-width: 800px;
    margin: 0 auto;
}

.pdf-settings {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.pdf-list {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.list-header {
    text-align: center;
    margin-bottom: 2rem;
}

.list-header h3 {
    margin: 0 0 0.5rem 0;
    color: #374151;
}

.list-header p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.pdf-items {
    min-height: 100px;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 1rem;
    background: white;
}

.merge-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.split-options {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.split-mode {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.split-mode label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.split-settings {
    margin-bottom: 2rem;
}

.page-range-settings,
.every-pages-settings {
    max-width: 400px;
    margin: 0 auto;
}

.page-range-settings label,
.every-pages-settings label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.page-range-settings input,
.every-pages-settings input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
}

/* Base64 Converter */
.base64-converter {
    max-width: 800px;
    margin: 0 auto;
}

.converter-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 0.25rem;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
}

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

.text-converter,
.file-converter {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
}

.input-section,
.output-section {
    margin-bottom: 2rem;
}

.input-section label,
.output-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.conversion-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.file-info {
    margin: 1rem 0;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 8px;
}

.file-details p {
    margin: 0.25rem 0;
    color: #374151;
}

.base64-output {
    margin-top: 2rem;
}

/* Home Page Styles */
.home-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.home-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin: 0;
    font-weight: 400;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
}

.home-categories {
    max-width: 1200px;
    margin: 0 auto;
}

.category-section {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-description {
    font-size: 1.1rem;
    color: #64748b;
    margin: 0 0 2rem 0;
}

.home-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.home-tool-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.home-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.home-tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.home-tool-card:hover::before {
    transform: scaleX(1);
}

.tool-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.home-tool-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.home-tool-card p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.home-btn {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    color: white !important;
}

.home-btn:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
}

/* Calculator Styles */
.calculator {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.calculator-display {
    margin-bottom: 1.5rem;
}

.calculator-display input {
    width: 100%;
    padding: 1.5rem;
    font-size: 2rem;
    text-align: right;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-family: 'Courier New', monospace;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.calc-btn {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calc-number {
    background: #f1f5f9;
    color: #334155;
}

.calc-number:hover {
    background: #e2e8f0;
}

.calc-operator {
    background: #3b82f6;
    color: white;
}

.calc-operator:hover {
    background: #2563eb;
}

.calc-equals {
    background: #10b981;
    color: white;
    grid-row: span 2;
}

.calc-equals:hover {
    background: #059669;
}

.calc-clear {
    background: #ef4444;
    color: white;
}

.calc-clear:hover {
    background: #dc2626;
}

.calc-zero {
    grid-column: span 2;
}

.calc-plus {
    grid-row: span 2;
}

/* Percentage Calculator Styles */
.percentage-calculator {
    max-width: 800px;
    margin: 0 auto;
}

.calc-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.calc-section h3 {
    margin: 0 0 1.5rem 0;
    color: #1e293b;
    font-size: 1.25rem;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.input-row input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 120px;
}

.input-row span {
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

.result {
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0369a1;
    min-height: 60px;
    display: flex;
    align-items: center;
}

/* BMI Calculator Styles */
.bmi-calculator {
    max-width: 600px;
    margin: 0 auto;
}

.bmi-inputs {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.height-inputs,
.weight-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.height-inputs input,
.weight-inputs input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    width: 80px;
}

.height-inputs span,
.weight-inputs span {
    font-weight: 500;
    color: #64748b;
}

.bmi-result {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.bmi-value {
    font-size: 3rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.bmi-category {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.bmi-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.bmi-range {
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

.bmi-range.underweight {
    background: #dbeafe;
    color: #1e40af;
}

.bmi-range.normal {
    background: #dcfce7;
    color: #166534;
}

.bmi-range.overweight {
    background: #fef3c7;
    color: #92400e;
}

.bmi-range.obese {
    background: #fee2e2;
    color: #991b1b;
}

/* Tool Description Styles */
.tool-description {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1rem;
    margin-bottom: 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.description-content h3 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.description-content > p {
    color: #475569;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-item h4 {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.feature-item p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.usage-examples,
.use-cases,
.goal-examples {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.usage-examples h4,
.use-cases h4,
.goal-examples h4 {
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.usage-examples h4::before {
    content: "📋";
}

.use-cases h4::before {
    content: "🎯";
}

.goal-examples h4::before {
    content: "💡";
}

.usage-examples ol {
    color: #475569;
    line-height: 1.6;
    margin: 0;
    padding-left: 1.5rem;
}

.usage-examples ol li {
    margin-bottom: 0.5rem;
}

.usage-examples ol li strong {
    color: #1e293b;
}

.use-cases ul {
    color: #475569;
    line-height: 1.6;
    margin: 0;
    padding-left: 1.5rem;
}

.use-cases ul li {
    margin-bottom: 0.5rem;
}

.example-goal {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #3b82f6;
}

.example-goal:last-child {
    margin-bottom: 0;
}

.example-goal strong {
    color: #1e293b;
}

.example-goal em {
    color: #64748b;
    font-size: 0.9rem;
}

/* Category Descriptions Section */
.category-descriptions {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-top: 3rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.category-descriptions h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-descriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.category-desc-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #3b82f6;
    position: relative;
    overflow: hidden;
}

.category-desc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
}

.category-desc-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.category-desc-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    border: 3px solid #e0f2fe;
}

.category-desc-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    text-align: center;
}

.category-desc-card p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.category-desc-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-desc-card li {
    color: #374151;
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.category-desc-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Mobile Responsive for Productivity Tools */
@media (max-width: 768px) {
    .focus-progress-ring {
        width: 200px;
        height: 200px;
    }
    
    .focus-time {
        font-size: 2rem;
    }
    
    .todo-input-section,
    .habit-input-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .todo-input-section input,
    .habit-input-section input {
        min-width: auto;
    }
    
    .habits-grid {
        grid-template-columns: 1fr;
    }
    
    .screen-time-stats {
        grid-template-columns: 1fr;
    }
    
    .water-bottle {
        width: 80px;
        height: 160px;
    }
    
    .quote-text {
        font-size: 1.1rem;
    }
    
    .focus-controls,
    .water-controls,
    .eye-break-controls,
    .screen-time-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .focus-controls .btn,
    .water-controls .btn,
    .eye-break-controls .btn,
    .screen-time-controls .btn {
        width: 100%;
        max-width: 200px;
    }
    
    /* Text Tools Mobile Responsive */
    .text-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .case-buttons {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .reverse-options,
    .linebreak-options,
    .tts-buttons,
    .stt-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .reverse-options .btn,
    .linebreak-options .btn,
    .tts-buttons .btn,
    .stt-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .tts-settings {
        grid-template-columns: 1fr;
    }
    
    .search-inputs {
        grid-template-columns: 1fr;
    }
    
    .replace-options {
        flex-direction: column;
        gap: 1rem;
    }
    
    .replace-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .replace-buttons .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .password-display {
        flex-direction: column;
    }
    
    .character-options {
        grid-template-columns: 1fr;
    }
    
    .lorem-settings {
        flex-direction: column;
        text-align: center;
    }
    
    /* Image & File Tools Mobile Responsive */
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .compression-settings,
    .conversion-settings,
    .pdf-settings {
        flex-direction: column;
        text-align: center;
    }
    
    .dimension-controls {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .preset-sizes {
        flex-direction: column;
        align-items: center;
    }
    
    .preset-sizes .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .preview-container {
        grid-template-columns: 1fr;
    }
    
    .aspect-ratios {
        flex-direction: column;
        align-items: center;
    }
    
    .aspect-ratios .btn {
        width: 100%;
        max-width: 150px;
    }
    
    .crop-actions,
    .qr-actions,
    .barcode-actions,
    .merge-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .crop-actions .btn,
    .qr-actions .btn,
    .barcode-actions .btn,
    .merge-controls .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .qr-settings,
    .barcode-settings {
        grid-template-columns: 1fr;
    }
    
    .split-mode {
        flex-direction: column;
        gap: 1rem;
    }
    
    .conversion-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .conversion-buttons .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .converter-tabs {
        flex-direction: column;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    /* Home Page Mobile Responsive */
    .home-header h1 {
        font-size: 2rem;
    }
    
    .home-subtitle {
        font-size: 1rem;
    }
    
    .home-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .category-description {
        font-size: 1rem;
    }
    
    .home-tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .home-tool-card {
        padding: 1.25rem;
    }
    
    /* Header Mobile Responsive */
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .website-title h1 {
        font-size: 1.5rem;
    }
    
    .tagline {
        font-size: 0.75rem;
    }
    
    .nav-buttons {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    /* Tool Description Mobile Responsive */
    .tool-description {
        padding: 1.5rem;
        margin-top: 1rem;
        margin-bottom: 0;
    }
    
    .description-content h3 {
        font-size: 1.25rem;
    }
    
    .description-content > p {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-item {
        padding: 1.25rem;
    }
    
    .usage-examples,
    .use-cases,
    .goal-examples {
        padding: 1.25rem;
    }
    
    /* Category Descriptions Mobile */
    .category-descriptions {
        padding: 2rem 1.5rem;
        margin-top: 2rem;
    }
    
    .category-descriptions h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .category-descriptions-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-desc-card {
        padding: 1.5rem;
    }
    
    .category-desc-icon {
        width: 60px;
        height: 60px;
        font-size: 2.5rem;
    }
    
    .category-desc-card h3 {
        font-size: 1.25rem;
    }
}

/* Mobile Responsive for Other Tools */
@media (max-width: 768px) {
    .converter-grid,
    .calculator-grid,
    .time-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .age-results {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .time-diff-breakdown {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .calendar-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .world-clocks-grid {
        grid-template-columns: 1fr;
    }
    
    .converter-interface {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .converter-arrow {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }
    
    .result-value {
        font-size: 1.25rem;
        min-height: 50px;
    }
}
