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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    --bg-dark: #0a0e27;
    --bg-darker: #050814;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    
    --accent-purple: #667eea;
    --accent-pink: #f093fb;
    --accent-blue: #4facfe;
    --accent-green: #00f2fe;
    --accent-red: #f5576c;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated Background Gradient */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(240, 147, 251, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(79, 172, 254, 0.05) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.8; transform: scale(1.1) rotate(5deg); }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glass Card Effect */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* System Message Banner */
.system-message-banner {
    margin: 0 auto 1.5rem;
    max-width: 1200px;
    border-radius: 12px;
    overflow: hidden;
    animation: slideDown 0.4s ease-out;
    box-shadow: var(--shadow-md);
}

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

.system-message-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.system-message-banner.info .system-message-content {
    background: rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.system-message-banner.warning .system-message-content {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.system-message-banner.error .system-message-content {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.system-message-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.system-message-text {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.system-message-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.system-message-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

/* Enhanced Brand Container */
.brand-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand-name {
    background: linear-gradient(135deg, #667eea 0%, #f093fb 50%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.brand-tagline {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.8;
}

.logo-icon {
    width: 48px;
    height: 48px;
    stroke: url(#logoGradient);
    filter: drop-shadow(0 0 12px rgba(102, 126, 234, 0.5));
    animation: logoFloat 3s ease-in-out infinite;
}

.version-badge {
    padding: 0.35rem 0.75rem;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-blue);
    letter-spacing: 0.5px;
}

/* License Badge */
.license-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.license-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.license-badge.licensed {
    background: rgba(0, 242, 254, 0.15);
    color: var(--accent-green);
    border-color: rgba(0, 242, 254, 0.3);
}

.license-badge.unlicensed {
    background: rgba(245, 87, 108, 0.15);
    color: var(--accent-red);
    border-color: rgba(245, 87, 108, 0.3);
}

.license-icon {
    font-size: 1rem;
}

.license-text {
    font-size: 0.7rem;
}

/* License Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.license-info {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.license-key-display {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: var(--accent-blue);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    letter-spacing: 1px;
    margin: 0.75rem 0;
    word-break: break-all;
}

.license-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

.license-details p {
    margin: 0.5rem 0;
}

.license-input-group {
    margin-bottom: 1rem;
}

.license-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.license-input-group input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.license-input-group input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-modal {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-modal-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

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

.btn-modal-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 87, 108, 0.4);
}

.btn-modal-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-modal-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s ease;
}

.status-badge.recording .status-dot {
    background: var(--accent-red);
    animation: pulse 1.5s ease-in-out infinite;
}

.status-badge.playing .status-dot {
    background: var(--accent-blue);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.7; }
}

/* Main Panel */
.main-panel {
    margin-bottom: 2rem;
}

.control-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Record Button */
.record-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.btn-record {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 3rem;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.btn-record:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 30px rgba(102, 126, 234, 0.3);
    border-color: var(--accent-purple);
}

.btn-record.recording {
    border-color: var(--accent-red);
    animation: recordPulse 2s ease-in-out infinite;
}

.btn-record.recording .record-icon {
    animation: iconPulse 1.5s ease-in-out infinite;
}

@keyframes recordPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 87, 108, 0.7); }
    50% { box-shadow: 0 0 0 15px rgba(245, 87, 108, 0); }
}

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

.record-icon {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.icon-circle {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.btn-record.recording .icon-circle {
    color: var(--accent-red);
}

.record-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 1;
}

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

.record-timer {
    font-size: 1.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.keyboard-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.mouse-icon {
    width: 20px;
    height: 20px;
}

kbd {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-action:hover:not(:disabled)::before {
    opacity: 0.15;
}

.btn-action:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-action:active:not(:disabled) {
    transform: translateY(0);
}

.btn-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-play::before {
    background: var(--success-gradient);
}

.btn-play:hover:not(:disabled) {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 16px rgba(79, 172, 254, 0.3);
}

.btn-stop::before {
    background: var(--danger-gradient);
}

.btn-stop:hover:not(:disabled) {
    border-color: var(--accent-red);
    box-shadow: 0 4px 16px rgba(245, 87, 108, 0.3);
}

.btn-clear:hover:not(:disabled) {
    border-color: var(--text-muted);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Loop Control */
.loop-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
}

.toggle-input {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 56px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-input:checked + .toggle-switch {
    background: var(--primary-gradient);
}

.toggle-input:checked + .toggle-switch .toggle-slider {
    transform: translateX(24px);
    background: white;
}

.toggle-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.toggle-input:checked ~ .toggle-text {
    color: var(--text-primary);
}

.loop-icon {
    width: 20px;
    height: 20px;
}

.loop-counter {
    padding: 0.5rem 1rem;
    background: var(--primary-gradient);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
}

/* Statistics Panel */
.stats-panel {
    margin-bottom: 2rem;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.title-icon {
    width: 24px;
    height: 24px;
}

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

.stat-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

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

/* Humanize Panel */
.humanize-panel {
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.humanize-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #f093fb, #4facfe, #667eea);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.panel-header-premium {
    margin-bottom: 1.5rem;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.title-icon {
    width: 28px;
    height: 28px;
    stroke: var(--accent-purple);
}

.premium-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    border-radius: 6px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    animation: goldShine 2s ease-in-out infinite;
}

@keyframes goldShine {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.humanize-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(240, 147, 251, 0.08) 100%);
    border-left: 3px solid var(--accent-purple);
    border-radius: 12px;
    position: relative;
}

.offset-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.offset-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.offset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offset-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.offset-icon {
    width: 18px;
    height: 18px;
}

.offset-value {
    font-weight: 700;
    font-size: 1.1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 45px;
    text-align: right;
}

.offset-input-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.offset-input-group:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.offset-input {
    width: 70px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-align: right;
    outline: none;
    font-variant-numeric: tabular-nums;
}

.offset-input::-webkit-outer-spin-button,
.offset-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.offset-input[type=number] {
    -moz-appearance: textfield;
}

.offset-unit {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.offset-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
    transition: all 0.3s ease;
}

.offset-slider:hover {
    background: rgba(255, 255, 255, 0.15);
}

.offset-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-gradient);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
    transition: all 0.3s ease;
}

.offset-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.7);
}

.offset-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-gradient);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
    transition: all 0.3s ease;
}

.offset-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.7);
}

.offset-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-left: 0.5rem;
}

.humanize-features {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.feature-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.feature-icon {
    width: 16px;
    height: 16px;
}

.toggle-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.toggle-control-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.toggle-control-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}

.toggle-checkbox {
    display: none;
}

.toggle-indicator {
    position: relative;
    width: 48px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.toggle-indicator::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toggle-checkbox:checked + .toggle-indicator {
    background: var(--primary-gradient);
}

.toggle-checkbox:checked + .toggle-indicator::after {
    transform: translateX(22px);
    background: white;
}

.toggle-label-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    flex: 1;
}

.toggle-checkbox:checked ~ .toggle-label-text {
    color: var(--text-primary);
}

.toggle-icon {
    width: 18px;
    height: 18px;
}

.toggle-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-left: 4.5rem;
    margin-top: -0.5rem;
}

/* Macro Panel */
.macro-panel {
    margin-bottom: 2rem;
}

.macro-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.save-section {
    display: flex;
    gap: 1rem;
}

.input-field {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.btn-save {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-save:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-save:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.macro-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.macro-list::-webkit-scrollbar {
    width: 8px;
}

.macro-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.macro-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

.macro-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.macro-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

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

.macro-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.macro-info {
    flex: 1;
}

.macro-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.macro-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.btn-macro {
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-macro:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-macro.danger:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-hint {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    animation: toastSlide 0.3s ease;
    min-width: 300px;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--accent-blue);
}

.toast.error {
    border-left: 4px solid var(--accent-red);
}

.toast.info {
    border-left: 4px solid var(--accent-purple);
}

.toast-icon {
    width: 24px;
    height: 24px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .save-section {
        flex-direction: column;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Keybind Customization */
.keybind-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.keybind-clickable:hover {
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.keybind-clickable:active {
    transform: translateY(0);
}

/* Keybind Modal */
.keybind-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

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

.keybind-modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 2px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.keybind-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.keybind-modal-body {
    margin-top: 1.5rem;
}

.keybind-instruction {
    text-align: center;
    padding: 2rem 1rem;
}

.keybind-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    stroke: var(--accent-purple);
    animation: pulse 2s ease-in-out infinite;
}

.keybind-instruction p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 1rem 0;
}

.keybind-preview {
    display: inline-block;
    padding: 1rem 2rem;
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid var(--accent-purple);
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1rem;
    min-width: 150px;
    animation: glow 2s ease-in-out infinite;
}

.keybind-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.keybind-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.keybind-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.keybind-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.6);
    }
}

