* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #141414;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --text-muted: #555555;
    --border-color: #1a1a1a;
    --border-hover: #2a2a2a;
    --accent: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.1);
    --hover-bg: #161616;
    --card-bg: #0d0d0d;
    --glow: rgba(255, 255, 255, 0.05);
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px var(--glow); }
    50% { box-shadow: 0 0 40px var(--accent-glow); }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.01) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.01) 50%, transparent 70%);
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
    pointer-events: none;
    z-index: 0;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, 
        transparent, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent);
    animation: pulse-glow 3s ease-in-out infinite;
}

.logo {
    padding: 40px 28px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

.logo h1 {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.tagline {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-menu {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-glow), transparent);
    transition: width 0.3s ease;
}

.nav-item:hover::before {
    width: 100%;
}

.nav-item:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--text-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.nav-icon {
    font-size: 18px;
    filter: grayscale(1) brightness(10) contrast(100);
}

.nav-label {
    flex: 1;
    text-align: left;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.search-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.search-btn span {
    filter: grayscale(1) brightness(10) contrast(100);
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    border-radius: 50%;
}

.search-btn:hover::before {
    width: 300px;
    height: 300px;
}

.search-btn:hover {
    background: var(--hover-bg);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.search-btn kbd {
    padding: 4px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 11px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 300px;
    padding: 60px 80px;
    max-width: calc(100vw - 300px);
    position: relative;
    z-index: 1;
}

.content-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    margin-bottom: 56px;
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--text-primary), transparent);
    border-radius: 2px;
}

.page-title {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.page-description {
    font-size: 19px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: -0.2px;
    line-height: 1.6;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
}

.tool-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 180deg at 50% 50%, 
        transparent 0deg, 
        rgba(255, 255, 255, 0.05) 180deg, 
        transparent 360deg);
    animation: rotate 8s linear infinite;
    opacity: 0;
    transition: opacity 0.4s;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.tool-card:hover::before,
.tool-card:hover::after {
    opacity: 1;
}

.tool-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.tool-icon {
    font-size: 40px;
    filter: grayscale(1) brightness(10) contrast(100) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

.tool-icon-img {
    width: 40px;
    height: 40px;
    color: var(--text-primary);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tool-card:hover .tool-icon-img {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 6px 12px rgba(255, 255, 255, 0.2));
}

.tool-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.tool-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.tool-card:hover .tool-badge::before {
    left: 100%;
}

.tool-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.tool-card:hover .tool-name {
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.tool-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex: 1;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.tool-download {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: var(--text-primary);
    color: var(--bg-primary);
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.tool-download::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: width 0.4s, height 0.4s;
}

.tool-download:hover::before {
    width: 400px;
    height: 400px;
}

.tool-download:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(255, 255, 255, 0.1);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 120px 20px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    display: flex;
    animation: overlayFadeIn 0.3s ease forwards;
}

@keyframes overlayFadeIn {
    to { opacity: 1; }
}

.search-container {
    width: 100%;
    max-width: 700px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-hover);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 32px 80px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: scale(0.9) translateY(-30px);
    animation: searchSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes searchSlideIn {
    to {
        transform: scale(1) translateY(0);
    }
}

.search-input {
    width: 100%;
    padding: 26px 28px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 500;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-bottom-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.02);
}

.search-results {
    max-height: 520px;
    overflow-y: auto;
    padding: 12px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--text-primary);
    margin-bottom: 6px;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.search-result-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent);
    transition: width 0.3s ease;
}

.search-result-item:hover::before {
    width: 100%;
}

.search-result-item:hover {
    background: var(--hover-bg);
    border-color: var(--border-hover);
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.search-result-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.search-result-category {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.search-no-results {
    padding: 64px 32px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
}

/* Download Modal */
.download-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.download-modal.active {
    display: flex;
    animation: overlayFadeIn 0.3s ease forwards;
}

.download-modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-hover);
    border-radius: 20px;
    padding: 48px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 
        0 32px 80px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: scale(0.9);
    animation: modalScaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalScaleIn {
    to {
        transform: scale(1);
    }
}

.download-modal-icon {
    font-size: 72px;
    margin-bottom: 28px;
    animation: bounce 1.5s ease-in-out infinite;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.download-modal h3 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.download-modal p {
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.7;
    font-size: 15px;
}

.modal-buttons {
    display: flex;
    gap: 16px;
}

.modal-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: width 0.3s, height 0.3s;
}

.modal-btn:hover::before {
    width: 300px;
    height: 300px;
}

.modal-btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-btn-cancel:hover {
    background: var(--hover-bg);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.modal-btn-download {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.modal-btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
        padding: 32px;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 24px;
        max-width: 100vw;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

/* Selection */
::selection {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}
