@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --bg-glass-strong: rgba(255, 255, 255, 0.1);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #e8e8ef;
    --text-secondary: #8b8b9e;
    --text-muted: #55556a;
    --hyprland-primary: #00b4d8;
    --hyprland-secondary: #0077b6;
    --hyprland-glow: rgba(0, 180, 216, 0.3);
    --hyprland-gradient: linear-gradient(135deg, #00b4d8, #0077b6, #023e8a);
    --river-primary: #f77f00;
    --river-secondary: #e36414;
    --river-glow: rgba(247, 127, 0, 0.3);
    --river-gradient: linear-gradient(135deg, #f77f00, #e36414, #d00000);
    --cmd-blue: #2196f3;
    --cmd-blue-hover: #1976d2;
    --dotfile-orange: #ff9800;
    --dotfile-orange-hover: #f57c00;
    --success: #4caf50;
    --danger: #f44336;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.6);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb--1 {
    width: 600px;
    height: 600px;
    background: var(--hyprland-primary);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.bg-orb--2 {
    width: 500px;
    height: 500px;
    background: var(--river-primary);
    bottom: -150px;
    right: -100px;
    animation-delay: -7s;
}

.bg-orb--3 {
    width: 400px;
    height: 400px;
    background: #7c3aed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(60px, -40px) scale(1.1);
    }
    50% {
        transform: translate(-30px, 60px) scale(0.9);
    }
    75% {
        transform: translate(40px, 30px) scale(1.05);
    }
}

.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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: 60px 60px;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 32px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--transition-normal);
}

.app-header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
}

.app-header__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--hyprland-primary), var(--river-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px;
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.2), 0 0 20px rgba(247, 127, 0, 0.2);
}

.app-header__icon-svg {
    width: 14px;
    height: 14px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.app-header__icon-svg--left {
    clip-path: inset(0 50% 0 0);
    margin-right: -4px;
}

.app-header__icon-svg--right {
    clip-path: inset(0 0 0 10%);
    margin-left: -2px;
}

.app-header__title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--hyprland-primary), var(--river-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-header__nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    padding: 8px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-btn:hover {
    background: var(--bg-glass-strong);
    color: var(--text-primary);
    border-color: var(--border-glass-hover);
}

.nav-btn--active {
    color: var(--text-primary);
}

.nav-btn--hyprland.nav-btn--active {
    border-color: var(--hyprland-primary);
    background: rgba(0, 180, 216, 0.1);
    color: var(--hyprland-primary);
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.1);
}

.nav-btn--river.nav-btn--active {
    border-color: var(--river-primary);
    background: rgba(247, 127, 0, 0.1);
    color: var(--river-primary);
    box-shadow: 0 0 20px rgba(247, 127, 0, 0.1);
}

.btn-upload {
    padding: 8px 24px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--bg-glass-strong);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-glass);
}

.btn-upload:hover {
    transform: translateY(-1px);
    border-color: var(--border-glass-hover);
}

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

.btn-upload--hyprland {
    background: rgba(0, 180, 216, 0.15);
    color: var(--hyprland-primary);
    border-color: rgba(0, 180, 216, 0.3);
    box-shadow: 0 2px 12px rgba(0, 180, 216, 0.15);
}

.btn-upload--hyprland:hover {
    background: rgba(0, 180, 216, 0.25);
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.25);
    border-color: var(--hyprland-primary);
}

.btn-upload--river {
    background: rgba(247, 127, 0, 0.15);
    color: var(--river-primary);
    border-color: rgba(247, 127, 0, 0.3);
    box-shadow: 0 2px 12px rgba(247, 127, 0, 0.15);
}

.btn-upload--river:hover {
    background: rgba(247, 127, 0, 0.25);
    box-shadow: 0 4px 20px rgba(247, 127, 0, 0.25);
    border-color: var(--river-primary);
}

.page-container {
    margin-top: 73px;
    min-height: calc(100vh - 73px);
    position: relative;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: calc(100vh - 73px);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.page--active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    position: relative;
}

.page--exit-left {
    opacity: 0;
    transform: translateX(-40px);
}

.page--enter-right {
    opacity: 0;
    transform: translateX(40px);
}

.hero {
    text-align: center;
    padding: 100px 32px 60px;
    position: relative;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}

.hero__badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s ease-in-out infinite;
}

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

.hero__title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.05;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero__title-gradient {
    background: linear-gradient(135deg, var(--hyprland-primary) 0%, #a78bfa 50%, var(--river-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.hero__subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.6;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

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

.category-selector {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 0 32px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
    flex-wrap: wrap;
}

.category-card {
    position: relative;
    width: 380px;
    padding: 40px 32px;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: all var(--transition-normal);
    overflow: hidden;
    text-align: left;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.category-card--hyprland::before {
    background: var(--hyprland-gradient);
}

.category-card--river::before {
    background: var(--river-gradient);
}

.category-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glass-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card--hyprland:hover {
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 180, 216, 0.08);
}

.category-card--river:hover {
    box-shadow: var(--shadow-lg), 0 0 40px rgba(247, 127, 0, 0.08);
}

.category-card__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    padding: 10px;
}

.category-card__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-card--hyprland .category-card__logo {
    filter: drop-shadow(0 0 6px rgba(0, 180, 216, 0.4));
}

.category-card__logo--river {
    filter: brightness(0) invert(1) drop-shadow(0 0 6px rgba(247, 127, 0, 0.4));
}

.category-card--hyprland .category-card__icon {
    background: rgba(0, 180, 216, 0.1);
    box-shadow: 0 0 30px rgba(0, 180, 216, 0.1);
}

.category-card--river .category-card__icon {
    background: rgba(247, 127, 0, 0.1);
    box-shadow: 0 0 30px rgba(247, 127, 0, 0.1);
}

.category-card__title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.category-card__desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.category-card__count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-card--hyprland .category-card__count {
    color: var(--hyprland-primary);
}

.category-card--river .category-card__count {
    color: var(--river-primary);
}

.category-card__arrow {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    opacity: 0;
    font-size: 20px;
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.category-card:hover .category-card__arrow {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 48px 24px;
}

.section-header__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-header__back {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.section-header__back:hover {
    background: var(--bg-glass-strong);
    color: var(--text-primary);
    border-color: var(--border-glass-hover);
}

.section-header__title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.section-header__title--hyprland {
    color: var(--hyprland-primary);
}

.section-header__title--river {
    color: var(--river-primary);
}

.section-header__count {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.dotfiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    padding: 0 48px 60px;
    animation: fadeInUp 0.4s ease-out;
}

.dotfile-card {
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    overflow: hidden;
    transition: all var(--transition-normal);
    animation: cardAppear 0.5s ease-out both;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dotfile-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glass-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.dotfile-card__preview {
    width: 100%;
    height: 200px;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.dotfile-card__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.dotfile-card:hover .dotfile-card__preview img {
    transform: scale(1.05);
}

.dotfile-card__preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-muted);
    background: linear-gradient(135deg, var(--bg-secondary), rgba(255, 255, 255, 0.02));
}

.dotfile-card__body {
    padding: 20px;
}

.dotfile-card__name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dotfile-card__type-badge {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dotfile-card__type-badge--cmd {
    background: rgba(33, 150, 243, 0.15);
    color: var(--cmd-blue);
    border: 1px solid rgba(33, 150, 243, 0.25);
}

.dotfile-card__type-badge--dotfile {
    background: rgba(255, 152, 0, 0.15);
    color: var(--dotfile-orange);
    border: 1px solid rgba(255, 152, 0, 0.25);
}

.dotfile-card__source {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.dotfile-card__source a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    word-break: break-all;
}

.dotfile-card__source a:hover {
    color: var(--text-primary);
}

.dotfile-card__install {
    width: 100%;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dotfile-card__install--cmd {
    background: rgba(33, 150, 243, 0.12);
    color: var(--cmd-blue);
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.dotfile-card__install--cmd:hover {
    background: rgba(33, 150, 243, 0.2);
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.1);
}

.dotfile-card__install--dotfile {
    background: rgba(255, 152, 0, 0.12);
    color: var(--dotfile-orange);
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.dotfile-card__install--dotfile:hover {
    background: rgba(255, 152, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.1);
}

.dotfile-card__cmd-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    color: var(--text-secondary);
    word-break: break-all;
    display: none;
}

.dotfile-card__cmd-text--visible {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

.empty-state {
    text-align: center;
    padding: 80px 32px;
    animation: fadeInUp 0.5s ease-out;
}

.empty-state__icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state__title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state__text {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay--active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-xl);
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.95);
    transition: transform var(--transition-spring);
}

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

.modal__header {
    padding: 24px 28px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal__title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.modal__close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal__close:hover {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.3);
    color: var(--danger);
}

.modal__body {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--hyprland-primary);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

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

.form-input--mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

.form-select {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b8b9e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-select:focus {
    border-color: var(--hyprland-primary);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.install-type-selector {
    display: flex;
    gap: 10px;
}

.install-type-btn {
    flex: 1;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-glass);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.install-type-btn:hover {
    border-color: var(--border-glass-hover);
    color: var(--text-primary);
}

.install-type-btn--cmd {
    position: relative;
}

.install-type-btn--cmd.install-type-btn--active {
    border-color: var(--cmd-blue);
    background: rgba(33, 150, 243, 0.08);
    color: var(--cmd-blue);
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.08);
}

.install-type-btn--dotfile {
    position: relative;
}

.install-type-btn--dotfile.install-type-btn--active {
    border-color: var(--dotfile-orange);
    background: rgba(255, 152, 0, 0.08);
    color: var(--dotfile-orange);
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.08);
}

.install-type-btn__label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.install-type-btn__desc {
    display: block;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
}

.form-group--dynamic {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding-top: 0;
    padding-bottom: 0;
}

.form-group--dynamic.form-group--visible {
    max-height: 300px;
    opacity: 1;
    padding-top: 0;
    padding-bottom: 0;
}

.preview-upload {
    border: 2px dashed var(--border-glass);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.preview-upload:hover {
    border-color: var(--border-glass-hover);
    background: var(--bg-card);
}

.preview-upload__text {
    font-size: 13px;
    color: var(--text-muted);
}

.preview-upload__icon {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.4;
}

.preview-upload__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.preview-upload--has-image {
    padding: 0;
    height: 180px;
    border-style: solid;
    border-color: var(--border-glass-hover);
}

.btn-submit {
    width: 100%;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--bg-glass-strong);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    flex-shrink: 0;
}

.btn-submit--cmd {
    background: var(--cmd-blue);
    color: white;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.3);
}

.btn-submit--cmd:hover {
    background: var(--cmd-blue-hover);
    box-shadow: 0 6px 24px rgba(33, 150, 243, 0.4);
    transform: translateY(-1px);
}

.btn-submit--dotfile {
    background: var(--dotfile-orange);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.3);
}

.btn-submit--dotfile:hover {
    background: var(--dotfile-orange-hover);
    box-shadow: 0 6px 24px rgba(255, 152, 0, 0.4);
    transform: translateY(-1px);
}

.btn-submit--delete {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.3);
}

.btn-submit--delete:hover {
    background: #d32f2f;
    box-shadow: 0 6px 24px rgba(244, 67, 54, 0.4);
    transform: translateY(-1px);
}

.btn-submit:hover {
    transform: translateY(-1px);
}

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

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

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

.btn-submit:active::after {
    width: 300px;
    height: 300px;
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.4s var(--transition-spring) both;
    backdrop-filter: blur(20px);
}

.toast--success {
    border-color: rgba(76, 175, 80, 0.3);
    color: var(--success);
}

.toast--error {
    border-color: rgba(244, 67, 54, 0.3);
    color: var(--danger);
}

.toast--exit {
    animation: toastOut 0.3s ease-in both;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(40px) scale(0.9);
    }
}

.copy-tooltip {
    position: fixed;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    color: var(--success);
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
    z-index: 400;
    animation: fadeInUp 0.2s ease-out;
}

.dotfile-card__delete {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.dotfile-card:hover .dotfile-card__delete {
    opacity: 1;
}

.dotfile-card__delete:hover {
    background: rgba(244, 67, 54, 0.8);
    color: white;
}

.dotfile-card__preview {
    position: relative;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 2px;
    display: none;
}

.form-error--visible {
    display: block;
    animation: fadeInUp 0.2s ease-out;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

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

.modal::-webkit-scrollbar {
    width: 4px;
}

@media (max-width: 860px) {
    .category-selector {
        flex-direction: column;
        align-items: center;
    }

    .category-card {
        width: 100%;
        max-width: 400px;
    }

    .dotfiles-grid {
        grid-template-columns: 1fr;
        padding: 0 20px 40px;
    }

    .section-header {
        padding: 24px 20px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .app-header {
        padding: 12px 16px;
    }

    .app-header__title {
        display: none;
    }

    .hero {
        padding: 60px 20px 40px;
    }

    .hero__title {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .install-type-selector {
        flex-direction: column;
    }

    .modal {
        border-radius: var(--radius-lg);
    }

    .modal__body {
        padding: 20px;
    }
}
