/* ========================================
   Random Group Generator - Main Styles
   ======================================== */

/* CSS Variables */
:root {
    --primary: #0F172A;
    --primary-light: #1E293B;
    --secondary: #334155;
    --accent: #FFD700;
    --accent-hover: #FFC107;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;

    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --bg-primary: #020617;
    --bg-secondary: #0F172A;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.05);

    --border-color: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(255, 215, 0, 0.3);

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 215, 0, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn i {
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

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

.btn-danger:hover {
    background: #DC2626;
}

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

/* Section Styles */
section {
    padding: 80px 0;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.section-header h2 i {
    color: var(--accent);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.9);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

.logo i {
    font-size: 1.6rem;
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-menu a {
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent);
    background: var(--bg-glass);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 32px;
    cursor: pointer;
    position: relative;
    z-index: 1002;
    pointer-events: auto;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    padding: 0;
    border: none;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle i {
    display: none;
}

.nav-toggle .bar {
    display: block;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ffffff 0%, #fde68a 55%, #facc15 100%);
    border-radius: 999px;
    transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease;
    transform-origin: center;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
    position: absolute;
    left: 0;
    top: 50%;
}

.nav-toggle:hover .bar {
    filter: brightness(1.08);
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.45);
}

.nav-toggle.active {
}

.nav-toggle .bar1 {
    transform: translateY(-12px);
}
.nav-toggle .bar2 {
    transform: translateY(0);
}
.nav-toggle .bar3 {
    transform: translateY(12px);
}

.nav-toggle.active .bar1 {
    transform: translateY(0) rotate(-45deg);
}
.nav-toggle.active .bar2 {
    opacity: 0;
    transform: scaleX(0.2);
}
.nav-toggle.active .bar3 {
    transform: translateY(0) rotate(45deg);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 215, 0, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255, 215, 0, 0.2) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: particles 20s linear infinite;
}

@keyframes particles {
    0% { transform: translateY(0); }
    100% { transform: translateY(-60px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 40px;
    background: rgba(2, 6, 23, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.15);
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 50%, #FF9800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 60px rgba(255, 215, 0, 0.3);
    letter-spacing: -1px;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .hero-title {
        letter-spacing: 0;
    }

    .hero-content {
        padding: 24px;
        border-radius: 16px;
    }
}

.gold-text {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    transition: all 0.3s ease;
}

.stat-item:hover .stat-number {
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .stat-number {
        font-size: 1.8rem;
    }

    .hero-stats {
        gap: 15px;
    }
}

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

/* Generator Section */
.generator-section {
    background: var(--bg-secondary);
}

.generator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.glass-card {
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    transition: var(--transition);
    position: relative;
    overflow: visible;
}

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

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

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

/* Input Panel */
.input-panel h3,
.settings-panel h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.input-panel h3 i,
.settings-panel h3 i {
    color: var(--accent);
}

/* Input Methods */
.input-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.method-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.method-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.method-btn.active {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}

/* ====================================
   Enhanced Visual Improvements
   ==================================== */

/* Input tools buttons */
.input-tools {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.input-tools .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: var(--text-secondary);
}

.input-tools .btn:hover {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}

/* Input file area */
.input-file {
    margin-top: 16px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.input-file:hover {
    border-color: var(--accent);
    background: rgba(255, 215, 0, 0.05);
}

.input-file input[type="file"] {
    display: none;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.file-label:hover {
    color: var(--accent);
}

.file-label i {
    font-size: 1.5rem;
    color: var(--accent);
}

/* Names count display */
.names-count {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
}

.names-count span {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Setting hint text */
.setting-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

/* Improve input area styling */
.input-area {
    position: relative;
    margin-bottom: 16px;
}

.input-area textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    font-family: inherit;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    resize: vertical;
    transition: var(--transition);
    line-height: 1.6;
}

.input-area textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15), 0 0 20px rgba(255, 215, 0, 0.1);
}

.input-area textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Better method buttons */
.input-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.method-btn {
    flex: 1;
    min-width: calc(50% - 4px);
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.method-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-1px);
}

.method-btn.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--primary);
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.method-btn i {
    font-size: 0.9rem;
}

/* Improved settings panel */
.settings-panel {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.setting-group {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-group:last-of-type {
    border-bottom: none;
    margin-bottom: 30px;
    padding-bottom: 0;
}

.setting-group > label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

/* Better mode selector buttons */
.mode-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.mode-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(255, 215, 0, 0.08);
    transform: translateX(4px);
}

.mode-btn.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 193, 7, 0.1) 100%);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
}

.mode-btn.active i {
    color: var(--accent);
}

.mode-btn i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Improved input fields */
.input-with-unit {
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-with-unit input {
    width: 120px;
    padding: 14px 18px;
    font-size: 1.1rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-align: center;
    transition: var(--transition);
}

.input-with-unit input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

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

.input-with-unit .unit {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Better checkbox styling */
.checkbox-setting {
    margin-bottom: 18px;
}

.checkbox-setting:last-child {
    margin-bottom: 0;
}

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

.checkbox-label:hover .checkbox-text {
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 26px;
    height: 26px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-label:hover .checkmark {
    border-color: var(--accent);
    background: rgba(255, 215, 0, 0.1);
}

.checkbox-label input:checked + .checkmark {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.checkbox-label input:checked + .checkmark::after {
    position: absolute;
    content: '';
    left: 8px;
    top: 4px;
    width: 7px;
    height: 13px;
    border: solid var(--primary);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    font-size: 1rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

/* Enhanced generate button */
.btn-generate {
    width: 100%;
    padding: 20px;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 10px;
    animation: pulse 2s infinite;
    text-transform: uppercase;
}

.btn-generate:hover {
    animation: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
}

/* Results Section */
.results-section {
    margin-top: 40px;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.results-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-header h3 i {
    color: var(--accent);
}

.result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.statistics-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.statistics-bar .stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.statistics-bar .stat i {
    color: var(--accent);
}

.statistics-bar .stat strong {
    color: var(--text-primary);
}

/* Groups Container */
.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.group-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    animation: slideIn 0.5s ease forwards;
    opacity: 0;
}

.group-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

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

.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.group-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}

.group-leader {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--warning);
}

.group-leader i {
    font-size: 0.9rem;
}

.group-members {
    list-style: none;
}

.group-members li {
    padding: 8px 0;
    font-size: 0.95rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.group-members li:last-child {
    border-bottom: none;
}

.group-members li::before {
    content: '•';
    color: var(--accent);
    margin-right: 10px;
}

/* Random Order specific */
.order-card {
    grid-column: 1 / -1;
}

.order-members {
    -webkit-user-select: text;
    user-select: text;
    cursor: text;
    line-height: 1.9;
}

.order-members li {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.order-members li::before {
    content: '';
    margin-right: 0;
}

.order-number {
    color: var(--accent);
    font-weight: 700;
    min-width: 30px;
}

.order-name {
    color: var(--text-primary);
}

.btn-generate-again {
    display: block;
    margin: 0 auto;
}

/* How To Use Section */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step-card.glass-card,
.step-card.glass-card::before {
    overflow: visible !important;
}

.step-card {
    text-align: center;
    position: relative;
    padding: 45px 25px 35px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto;
}

.step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 20px auto;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent);
    transition: var(--transition);
    flex-shrink: 0;
}

.step-card:hover .step-icon {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.step-card h4 {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.4;
}

.step-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    visibility: visible;
}

/* Responsive step cards */
@media (max-width: 768px) {
    .step-card {
        min-height: auto;
        padding: 25px 15px;
    }

    .step-card p {
        font-size: 0.9rem;
    }
}

/* Tools Section */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.tool-card {
    text-align: center;
}

.tool-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
}

.tool-card h4 {
    margin-bottom: 10px;
}

.tool-card > p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.tool-input {
    margin-bottom: 20px;
}

.tool-input textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    resize: vertical;
    margin-bottom: 12px;
}

.tool-input textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.tool-input .btn {
    width: 100%;
}

/* Picker Result */
.picker-result {
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 193, 7, 0.1) 100%);
    border: 2px solid var(--accent);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Pairs Result */
.pairs-result {
    text-align: left;
}

.pair-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.pair-item i {
    color: var(--danger);
}

/* Wheel */
.wheel-container {
    margin: 52px 0 20px;
    position: relative;
}

.wheel {
    display: none;
}

.wheel-segment,
.wheel-segment-item {
    display: none;
}

#wheelCanvas {
    width: 500px;
    height: 500px;
    max-width: 100%;
    border-radius: 50%;
    background: #111827;
    box-shadow:
        0 0 0 4px rgba(255, 215, 0, 0.35),
        0 18px 36px rgba(0, 0, 0, 0.5);
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 35px solid #ef4444;
    z-index: 12;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}

.wheel-result {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    min-height: 40px;
}

/* History Section */
.history-list {
    max-width: 600px;
    margin: 0 auto;
}

.history-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.history-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: var(--transition);
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.history-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.history-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

#clearHistory {
    display: block;
    margin: 20px auto 0;
}

/* About Section */
.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 20px;
}

.about-logo i {
    font-size: 2.5rem;
}

.about-content > p {
    margin-bottom: 30px;
    line-height: 1.8;
}

.about-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-glass);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
}

.about-feature i {
    color: var(--success);
}

.version {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
}

.footer-logo i {
    font-size: 1.5rem;
}

.footer-content p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.success {
    border-color: var(--success);
}

.toast.success i {
    color: var(--success);
}

.toast.error {
    border-color: var(--danger);
}

.toast.error i {
    color: var(--danger);
}

.toast.info {
    border-color: var(--info);
}

.toast.info i {
    color: var(--info);
}

@keyframes navToggleGlowSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

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

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .generator-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 2rem; }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .navbar .nav-menu {
        position: absolute;
        top: 62px;
        right: 20px;
        left: auto;
        width: min(82vw, 320px);
        z-index: 1001;
        background: linear-gradient(160deg, rgba(2, 6, 23, 0.97), rgba(30, 41, 59, 0.98));
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 0;
        border: 1px solid rgba(250, 204, 21, 0.38);
        border-radius: 12px;
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(0.98);
        transform-origin: top right;
        transition: max-height .4s ease, opacity .3s ease, transform .3s ease, visibility .3s ease, box-shadow .3s ease;
        box-shadow: 0 18px 36px rgba(0,0,0,.45), 0 0 0 rgba(250, 204, 21, 0);
    }

    .navbar .nav-menu li {
        width: 100%;
    }

    .navbar .nav-menu a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .navbar .nav-menu li:last-child a {
        border-bottom: none;
    }

    .navbar .nav-menu.active,
    .navbar .nav-menu.show {
        max-height: 380px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        animation: navMenuDrop .32s ease;
        box-shadow: 0 18px 36px rgba(0,0,0,.48), 0 0 20px rgba(250, 204, 21, 0.22);
    }

    .navbar .nav-toggle {
        display: inline-flex;
    }

    .statistics-bar {
        flex-direction: column;
        gap: 15px;
    }

    .groups-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .btn-large {
        padding: 14px 30px;
        font-size: 1rem;
    }

    .method-btn {
        min-width: 100%;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
.shuffle-animation {
    animation: shuffle 0.5s ease-in-out infinite;
}

@keyframes shuffle {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-10px); }
    75% { transform: translateY(10px); }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Selection */
::selection {
    background: var(--accent);
    color: var(--primary);
}

/* Ad Slot Styles */
.ad-slot-container {
    width: 100%;
    min-height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 215, 0, 0.03);
    border: 1px dashed rgba(255, 215, 0, 0.2);
    margin: 10px 0;
    border-radius: 8px;
}

.rgp-ad-slot {
    width: 100%;
    min-height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.rgp-ad-placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.5;
    padding: 20px;
    text-align: center;
}

.rgp-ad-provider-box {
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
}

