.search-container {
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.modal-search-container {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-icon {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    stroke-width: 2;
    fill: none;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-clear {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
    text-decoration: none;
}

.search-clear:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.search-clear svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.search-results-info {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

.search-results-info span {
    font-weight: 600;
    color: var(--primary-color);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-align: center;
}

.page-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.repo-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.repo-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.repo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.repo-container:hover::before {
    transform: scaleX(1);
}

.repo-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.repo-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.repo-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--bg-primary);
}

.repo-info {
    flex: 1;
}

.repo-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.repo-url {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    word-break: break-all;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.repo-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.repo-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.ipa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.ipa-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.ipa-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.ipa-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ipa-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.ipa-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ipa-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--primary-color);
}

.ipa-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.ipa-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.ipa-download-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.375rem;
    background: var(--primary-gradient);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-decoration: none;
}

.ipa-download-btn:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-1px);
}

.ipa-download-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid transparent;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary-gradient));
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-container p {
    color: var(--text-secondary);
    font-size: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
    text-align: center;
}

.error-container svg {
    width: 64px;
    height: 64px;
    fill: var(--text-secondary);
    margin-bottom: 1rem;
}

.error-container h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.retry-btn {
    background: var(--primary-gradient);
    color: var(--bg-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.retry-btn:hover {
    background: var(--primary-gradient-hover);
}

@media (min-width: 1200px) {
    .repo-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 2.5rem;
    }
    
    .page-title {
        font-size: 3rem;
    }
    
    .page-description {
        font-size: 1.2rem;
    }
    
    .modal-content {
        max-width: 1000px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .repo-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .page-title {
        font-size: 2.75rem;
    }
}

@media (max-width: 767px) {
    .repo-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .repo-container {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .repo-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .repo-icon {
        width: 50px;
        height: 50px;
    }
    
    .repo-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .repo-name {
        font-size: 1.1rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .ipa-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-buttons-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .repo-container {
        padding: 1.25rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .modal-content {
        width: 98%;
        margin: 0.5rem;
    }
}

[data-theme="dark"] .repo-container,
[data-theme="dark"] .modal-content {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="light"] .repo-container,
[data-theme="light"] .modal-content {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.repo-container:focus,
.modal-close:focus,
.ipa-download-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.ipa-download-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.ipa-download-btn.loading svg {
    animation: spin 1s linear infinite;
} 
