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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 3rem 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.subtitle {
    color: #8899aa;
    font-size: 1.1rem;
}

main {
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #13131f;
    border: 1px solid #2a2a3d;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 2rem;
    transition: border-color 0.3s;
}

.search-bar:focus-within {
    border-color: #4fc3f7;
}

.search-bar svg {
    color: #666;
    flex-shrink: 0;
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    color: #e0e0e0;
    font-size: 1rem;
    width: 100%;
    font-family: inherit;
}

.search-bar input::placeholder {
    color: #555;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.guide-card {
    background: #13131f;
    border: 1px solid #2a2a3d;
    border-radius: 16px;
    padding: 1.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4fc3f7, #29b6f6);
    opacity: 0;
    transition: opacity 0.3s;
}

.guide-card:hover {
    border-color: #4fc3f7;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(79, 195, 247, 0.1);
}

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

.guide-card.hidden {
    display: none;
}

.card-icon {
    margin-bottom: 1rem;
    color: #4fc3f7;
}

.guide-card h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.guide-card p {
    color: #8899aa;
    font-size: 0.9rem;
    line-height: 1.5;
}

.card-arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: #4fc3f7;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s;
}

.guide-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

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

.modal {
    background: #13131f;
    border: 1px solid #2a2a3d;
    border-radius: 20px;
    width: 100%;
    max-width: 750px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: sticky;
    top: 1rem;
    float: right;
    margin: 1rem 1rem 0 0;
    background: #1e1e2f;
    border: 1px solid #2a2a3d;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #e53935;
    border-color: #e53935;
}

.modal-content {
    padding: 2rem 2.5rem 2.5rem;
}

.modal-content h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.modal-content .guide-subtitle {
    color: #4fc3f7;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: block;
}

.video-container {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    background: #0a0a0f;
    border: 1px solid #2a2a3d;
}

.video-container video {
    width: 100%;
    display: block;
    max-height: 400px;
    background: #000;
}

.step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.step-number {
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
    color: #0a0a0f;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.step-content p {
    color: #8899aa;
    font-size: 0.9rem;
    line-height: 1.6;
}

.step-content .note {
    background: rgba(79, 195, 247, 0.08);
    border-left: 3px solid #4fc3f7;
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #a0c4d8;
}

.step-content .warning {
    background: rgba(255, 152, 0, 0.08);
    border-left: 3px solid #ff9800;
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #d4a06a;
}

.step-content code {
    background: #1e1e2f;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #4fc3f7;
}

.models-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.model-tag {
    background: #1e1e2f;
    border: 1px solid #2a2a3d;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #4fc3f7;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #444;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.03);
}

/* Scrollbar */
.modal::-webkit-scrollbar {
    width: 6px;
}

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

.modal::-webkit-scrollbar-thumb {
    background: #2a2a3d;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 700px) {
    header {
        padding: 2rem 1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

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

    .modal-content {
        padding: 1.5rem;
    }

    .modal-content h2 {
        font-size: 1.25rem;
    }
}
