/* Components Page Styles */
:root {
    --comp-bg: #f8fafc;
    --comp-card-bg: #ffffff;
    --comp-border: #e2e8f0;
    --comp-primary: #4f46e5;
}

.components-page-wrapper {
    padding-top: 100px;
    padding-bottom: 60px;
    background: var(--comp-bg);
    min-height: 100vh;
}

.components-hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--comp-border);
}

.components-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--comp-primary), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.components-hero p {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.components-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.component-card {
    background: var(--comp-card-bg);
    border: 1px solid var(--comp-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.component-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.component-preview {
    height: 200px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--comp-border);
    position: relative;
    overflow: hidden;
}

.component-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.component-preview .placeholder-icon {
    font-size: 3rem;
    color: #cbd5e1;
}

.component-info {
    padding: 1.5rem;
}

.component-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--comp-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.component-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.component-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.component-actions {
    display: flex;
    gap: 1rem;
}

.btn-view-code {
    flex: 1;
    padding: 0.6rem;
    text-align: center;
    background: var(--comp-primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-view-code:hover {
    background: #4338ca;
}

.btn-preview {
    padding: 0.6rem 1rem;
    border: 1px solid var(--comp-border);
    border-radius: 8px;
    color: #64748b;
    transition: all 0.3s;
}

.btn-preview:hover {
    border-color: var(--comp-primary);
    color: var(--comp-primary);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    padding: 2.5rem;
    border-radius: 24px;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #ef4444;
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: #eff6ff;
    color: #4f46e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.modal-content h2 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 1rem;
}

.modal-content p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-actions .btn-cta {
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
}

.btn-secondary {
    padding: 0.8rem 2rem;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}
