/* ============================================
   UTILITY HUB - PRODUCTION CSS
   Modern, responsive, professional styling
   ============================================ */

/* ============================================
   CSS VARIABLES & THEMING
   ============================================ */
:root {
    /* Enhanced Color Palette */
    --primary-color: #6a11cb;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --tertiary-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --warm-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --cool-gradient: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    --sunset-gradient: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%);
    
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    --background-color: #0f0c29;
    --background-gradient: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --surface-color: rgba(255, 255, 255, 0.05);
    --card-background: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #b8b8d4;
    --border-color: rgba(255, 255, 255, 0.1);
    --glow-color: rgba(102, 126, 234, 0.4);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 20px var(--glow-color), 0 0 40px var(--glow-color);
    
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark Mode */
.dark-mode {
    --primary-color: #8b5cf6;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    --background-color: #0a0118;
    --background-gradient: linear-gradient(135deg, #0a0118 0%, #1a0b2e 50%, #16003b 100%);
    --surface-color: rgba(255, 255, 255, 0.03);
    --card-background: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #b8b8d4;
    --border-color: rgba(255, 255, 255, 0.08);
    --glow-color: rgba(139, 92, 246, 0.5);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.8);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
    --shadow-glow: 0 0 30px var(--glow-color), 0 0 60px var(--glow-color);
}

.dark-mode body::before {
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(167, 139, 250, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(124, 58, 237, 0.4) 0%, transparent 50%);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--background-gradient);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(252, 70, 107, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(99, 102, 241, 0.3) 0%, transparent 50%);
    animation: backgroundShift 20s ease infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.1) translateY(-20px);
    }
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

code, kbd {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ============================================
   LAYOUT - APP CONTAINER
   ============================================ */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 80px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    animation: gradientShift 5s ease infinite;
    text-shadow: 0 0 80px rgba(102, 126, 234, 0.5);
}

@keyframes gradientShift {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(20deg);
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 300;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(102, 126, 234, 0.5);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
    background: var(--card-background);
    backdrop-filter: blur(20px);
    padding: 20px 30px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(102, 126, 234, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: headerShine 3s ease-in-out infinite;
}

@keyframes headerShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.app-title {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    position: relative;
    z-index: 1;
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: relative;
}

#dark-mode-checkbox {
    display: none;
}

#dark-mode-checkbox + label {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 60px;
    height: 32px;
    background: var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

#dark-mode-checkbox + label::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    background: var(--surface-color);
    border-radius: 50%;
    left: 3px;
    top: 3px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

#dark-mode-checkbox:checked + label {
    background: var(--primary-color);
}

#dark-mode-checkbox:checked + label::after {
    transform: translateX(28px);
}

.toggle-icon {
    position: absolute;
    font-size: 16px;
    z-index: 1;
    transition: var(--transition);
}

.toggle-icon.sun {
    left: 6px;
    opacity: 1;
}

.toggle-icon.moon {
    right: 6px;
    opacity: 0;
}

#dark-mode-checkbox:checked + label .sun {
    opacity: 0;
}

#dark-mode-checkbox:checked + label .moon {
    opacity: 1;
}

/* ============================================
   NAVIGATION TABS
   ============================================ */
.tab-navigation {
    display: flex;
    gap: 12px;
    background: var(--card-background);
    backdrop-filter: blur(20px);
    padding: 12px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    overflow-x: auto;
    animation: slideDown 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    min-width: max-content;
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition);
}

.tab-btn:hover::before {
    opacity: 0.1;
}

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

.tab-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px) scale(1.05);
}

.tab-btn.active::before {
    opacity: 1;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    animation: fadeIn 0.7s ease;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* ============================================
   TOOL CARDS
   ============================================ */
.tool-card {
    background: var(--card-background);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.tool-card:hover::before {
    opacity: 0.3;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
}

.tool-card h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.tool-description {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.02);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-secondary);
    color: white;
}

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

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

.btn-small {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

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

.btn-icon {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background: var(--border-color);
    transform: scale(1.1);
}

.buttons-container {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ============================================
   PRESET BUTTONS
   ============================================ */
.preset-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 12px 24px;
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.preset-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: var(--transition);
}

.preset-btn:hover::before {
    left: 0;
}

.preset-btn:hover {
    border-color: transparent;
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-glow);
}

.preset-btn span {
    position: relative;
    z-index: 1;
}

/* ============================================
   FORM CONTROLS
   ============================================ */
.options-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.options-container.vertical {
    flex-direction: column;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-group label {
    font-weight: 500;
    color: var(--text-primary);
}

input[type="number"],
input[type="text"],
select,
textarea {
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

input[type="number"] {
    width: 80px;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: var(--shadow);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow);
}

textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ============================================
   LOTTO BALLS CONTAINER
   ============================================ */
.balls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    min-height: 100px;
    margin: 40px 0;
    flex-wrap: wrap;
    padding: 20px;
    background: var(--surface-color);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--border-color);
    position: relative;
    overflow: hidden;
}

.balls-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.balls-container:empty::after {
    content: '🎲 Click Generate to Create Magic!';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* ============================================
   PASSWORD GENERATOR
   ============================================ */
.password-display {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#password-output {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.password-strength {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--surface-color);
    border-radius: var(--radius);
}

.strength-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
    margin-bottom: 8px;
    transition: var(--transition);
}

.strength-text {
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============================================
   DECISION MAKER
   ============================================ */
.decision-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.decision-tool {
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: var(--radius-xl);
    text-align: center;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.decision-tool::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 15s linear infinite;
}

.decision-tool:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(102, 126, 234, 0.5);
}

.decision-tool h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.decision-result {
    font-size: 80px;
    margin: 30px 0;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: var(--card-background);
    border-radius: var(--radius-lg);
    border: 3px dashed var(--border-color);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.decision-result:hover {
    transform: scale(1.05);
    border-style: solid;
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

.dice-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.dice-rolls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.die {
    font-size: 32px;
    padding: 10px;
    background: var(--border-color);
    border-radius: var(--radius);
}

.dice-total {
    margin-top: 10px;
    font-size: 24px;
    font-weight: bold;
}

.custom-picker {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.picker-result {
    background: var(--surface-color);
    padding: 20px;
    border-radius: var(--radius);
    min-height: 80px;
}

/* ============================================
   COLOR PALETTE
   ============================================ */
.palette-options {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.color-swatch {
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

.color-box {
    width: 100%;
    height: 150px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.color-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: var(--transition);
}

.color-box:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: var(--shadow-xl), 0 0 40px currentColor;
}

.color-box:hover::before {
    animation: shine 1.5s ease-in-out infinite;
}

@keyframes shine {
    0% {
        top: -50%;
        left: -50%;
    }
    100% {
        top: 150%;
        left: 150%;
    }
}

.color-info {
    text-align: center;
    margin-top: 15px;
}

.color-hex {
    display: block;
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 700;
    background: var(--surface-color);
    padding: 8px;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

.color-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* ============================================
   UUID GENERATOR
   ============================================ */
.uuid-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.uuid-output {
    background: var(--surface-color);
    padding: 20px;
    border-radius: var(--radius);
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.uuid-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: var(--card-background);
    border-radius: var(--radius-sm);
    animation: slideRight 0.3s ease;
}

.uuid-item code {
    font-size: 0.95rem;
    background: transparent;
}

/* ============================================
   TIMER
   ============================================ */
.timer-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.timer-tab-btn {
    flex: 1;
    padding: 14px;
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.timer-tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition);
}

.timer-tab-btn.active {
    border-color: transparent;
    color: white;
    transform: scale(1.05);
}

.timer-tab-btn.active::before {
    opacity: 1;
}

.timer-tab-btn span {
    position: relative;
    z-index: 1;
}

.timer-content {
    display: none;
}

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

.timer-display {
    font-size: 5rem;
    font-weight: 900;
    text-align: center;
    font-family: 'Courier New', monospace;
    margin: 50px 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 80px rgba(102, 126, 234, 0.5);
    transition: var(--transition);
    padding: 30px;
    border-radius: var(--radius-xl);
    background: var(--surface-color);
    border: 3px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.timer-display::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    z-index: -1;
    opacity: 0.2;
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.2;
        filter: blur(5px);
    }
    50% {
        opacity: 0.5;
        filter: blur(10px);
    }
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.countdown-inputs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.time-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.time-input input {
    width: 80px;
    text-align: center;
    font-size: 1.2rem;
}

.lap-times {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: var(--surface-color);
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    animation: slideDown 0.3s ease;
}

/* ============================================
   HISTORY
   ============================================ */
.history-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-header h3 {
    color: var(--text-primary);
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-style: italic;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--surface-color);
    margin-bottom: 10px;
    border-radius: var(--radius);
    transition: var(--transition);
    animation: slideDown 0.3s ease;
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.history-content {
    flex: 1;
}

.history-actions {
    display: flex;
    gap: 5px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 24px;
    background: var(--card-background);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(102, 126, 234, 0.3);
    min-width: 320px;
    transform: translateX(400px);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    animation: toastSlide 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes toastSlide {
    0% {
        transform: translateX(400px) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid var(--success-color);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(16, 185, 129, 0.3);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(239, 68, 68, 0.3);
}

.toast-info {
    border-left: 4px solid var(--info-color);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(59, 130, 246, 0.3);
}

.toast-icon {
    font-size: 1.8rem;
    animation: iconBounce 0.6s ease;
}

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

.toast-message {
    flex: 1;
    font-weight: 600;
    font-size: 1rem;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--card-background);
    backdrop-filter: blur(20px);
    padding: 50px;
    border-radius: var(--radius-xl);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl), 0 0 80px rgba(102, 126, 234, 0.4);
    animation: modalSlide 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 2px solid var(--border-color);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    opacity: 0.2;
    z-index: -1;
    animation: borderPulse 3s ease-in-out infinite;
}

@keyframes modalSlide {
    0% {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes borderPulse {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.5;
    }
}

.modal-content h2 {
    margin-bottom: 25px;
    color: var(--text-primary);
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.shortcut {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--surface-color);
    border-radius: var(--radius-sm);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    justify-content: flex-end;
}

/* Premium Modal */
.premium-modal-content {
    max-width: 800px;
}

.premium-features ul {
    list-style: none;
    margin: 30px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.premium-features li {
    padding: 15px 20px;
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    transition: var(--transition);
    font-size: 1.05rem;
    font-weight: 600;
}

.premium-features li:hover {
    transform: translateX(10px);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.premium-pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.price-option {
    padding: 40px 30px;
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-xl);
    text-align: center;
    position: relative;
    transition: var(--transition);
}

.price-option:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
}

.price-option.recommended {
    border-color: rgba(102, 126, 234, 0.8);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.price-option.recommended:hover {
    transform: scale(1.08) translateY(-10px);
}

.price-option .badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-lg);
    animation: badgeBounce 2s ease-in-out infinite;
}

@keyframes badgeBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.price {
    font-size: 3rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 20px 0;
}

.price span {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* ============================================
   FOOTER
   ============================================ */
.app-footer {
    margin-top: 60px;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    background: var(--surface-color);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

.app-footer p {
    margin: 10px 0;
}

.app-footer a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.app-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition);
}

.app-footer a:hover {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-footer a:hover::after {
    width: 100%;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes roll {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(360deg);
    }
}

@keyframes flip {
    0%, 100% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(180deg);
    }
}

@keyframes flip3d {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(1080deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .app-container {
        padding: 10px;
    }
    
    .hero-section {
        padding: 60px 15px 40px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 15px;
    }
    
    .stat-item {
        padding: 15px 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .app-header {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }
    
    .app-title {
        font-size: 1.8rem;
    }
    
    .tab-navigation {
        overflow-x: scroll;
        scrollbar-width: thin;
        gap: 8px;
    }
    
    .tab-btn {
        padding: 12px 18px;
        font-size: 0.9rem;
    }
    
    .tool-card {
        padding: 25px;
    }
    
    .tool-card h2 {
        font-size: 2rem;
    }
    
    .timer-display {
        font-size: 3rem;
        padding: 20px;
    }
    
    .decision-result {
        font-size: 60px;
        min-height: 100px;
    }
    
    .toast-container {
        left: 10px;
        right: 10px;
    }
    
    .toast {
        min-width: auto;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
    
    .price-option {
        padding: 30px 20px;
    }
    
    .price {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .stat-item {
        width: 100%;
    }
    
    .app-title {
        font-size: 1.5rem;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .tool-card {
        padding: 20px;
    }
    
    .tool-card h2 {
        font-size: 1.6rem;
    }
    
    .options-container {
        flex-direction: column;
    }
    
    .buttons-container {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .timer-display {
        font-size: 2.2rem;
    }
    
    .decision-result {
        font-size: 50px;
    }
    
    .modal-content h2 {
        font-size: 1.8rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .app-header,
    .tab-navigation,
    .app-footer,
    .buttons-container,
    .toast-container,
    .modal {
        display: none !important;
    }
    
    .tool-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--surface-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
    border: 2px solid var(--surface-color);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.8) var(--surface-color);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
