:root {
    --bg: #0a0a0f;
    --bg2: #12121a;
    --glass: rgba(18, 18, 26, 0.85);
    --text: #ffffff;
    --text2: #8b8b9a;
    --accent: #06b6d4;
    --accent2: #22d3ee;
    --gradient: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
    --success: #22c55e;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
    --bg: #f0f9ff;
    --bg2: #ffffff;
    --glass: rgba(255, 255, 255, 0.9);
    --text: #0c4a6e;
    --text2: #64748b;
    --border: rgba(0, 0, 0, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.app {
    position: relative;
    min-height: 100vh;
    padding: 24px;
    max-width: 800px;
    margin: 0 auto;
}

/* Background Effects */
.bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    bottom: -50px;
    left: -50px;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, 20px) scale(1.05);
    }
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Glass Card */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1 span {
    font-weight: 400;
}

.icon-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--accent);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block;
}

.moon-icon {
    display: none;
}

.sun-icon {
    display: block;
}

/* UUID Display */
.uuid-display {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#uuid-output {
    flex: 1;
    padding: 16px 20px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: var(--text);
    letter-spacing: 0.5px;
    text-align: center;
}

#uuid-output:focus {
    outline: none;
    border-color: var(--accent);
}

.uuid-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    border-color: var(--accent);
    background: rgba(6, 182, 212, 0.1);
}

.action-btn.primary {
    background: var(--gradient);
    border: none;
    color: #000;
}

.action-btn.primary:hover {
    transform: scale(1.05);
}

.action-btn svg {
    width: 22px;
    height: 22px;
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.85rem;
    color: var(--text2);
    font-weight: 500;
}

.version-tabs {
    display: flex;
    gap: 8px;
}

.version-btn {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text2);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.version-btn:hover {
    border-color: var(--accent);
}

.version-btn.active {
    background: var(--gradient);
    color: #000;
    border-color: transparent;
    font-weight: 500;
}

.format-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.radio-option input,
.checkbox-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Primary Button */
.primary-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient);
    border: none;
    border-radius: 12px;
    color: #000;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

.primary-btn svg {
    width: 20px;
    height: 20px;
}

/* Bulk Section */
.glass-card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.glass-card h2 svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.bulk-controls {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.bulk-controls .control-group {
    flex: 1;
}

.bulk-controls input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: var(--bg);
    border-radius: 4px;
    cursor: pointer;
}

.bulk-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--gradient);
    border-radius: 50%;
    cursor: pointer;
}

.secondary-btn {
    padding: 12px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.secondary-btn:hover:not(:disabled) {
    border-color: var(--accent);
    background: rgba(6, 182, 212, 0.1);
}

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.secondary-btn svg {
    width: 18px;
    height: 18px;
}

.bulk-output {
    background: var(--bg);
    border-radius: 12px;
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.bulk-placeholder,
.history-placeholder {
    color: var(--text2);
    text-align: center;
    padding: 20px;
}

.bulk-uuid {
    padding: 8px 12px;
    background: var(--bg2);
    border-radius: 8px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.bulk-uuid:hover {
    background: rgba(6, 182, 212, 0.1);
}

.bulk-uuid:last-child {
    margin-bottom: 0;
}

.bulk-actions {
    display: flex;
    gap: 10px;
}

/* History Section */
.history-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: 10px;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    background: rgba(6, 182, 212, 0.1);
}

.history-item .time {
    font-size: 0.75rem;
    color: var(--text2);
    font-family: 'Inter', sans-serif;
}

.ghost-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--text2);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ghost-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Info Section */
.info-section p {
    color: var(--text2);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.uuid-breakdown {
    background: var(--bg);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.uuid-example {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    margin-bottom: 12px;
}

.segment {
    padding: 4px 0;
}

.s1 {
    color: #ef4444;
}

.s2 {
    color: #f59e0b;
}

.s3 {
    color: #22c55e;
}

.s4 {
    color: #3b82f6;
}

.s5 {
    color: #8b5cf6;
}

.segment-labels {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.7rem;
    color: var(--text2);
    flex-wrap: wrap;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.4);
    transition: all 0.2s;
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
}

.fab svg {
    width: 24px;
    height: 24px;
    stroke: #000;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg2);
    border: 1px solid var(--accent);
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 600px) {
    .app {
        padding: 16px;
    }

    .uuid-display {
        flex-direction: column;
    }

    .uuid-actions {
        justify-content: center;
    }

    .bulk-controls {
        flex-direction: column;
    }

    .bulk-actions {
        flex-direction: column;
    }

    .segment-labels {
        gap: 10px;
    }
}

/* Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.generating {
    animation: pulse 0.5s ease-in-out;
}