/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Notification System */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--transition-normal);
    z-index: 1001;
    max-width: 300px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification.info {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
}

/* Form Field Errors */
.field-error {
    color: var(--color-error);
    font-size: 0.75rem;
    margin-top: var(--space-xs);
    display: block;
    font-weight: 500;
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Enhanced Contact Form Styles */
.contact-form .form-group {
    position: relative;
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus {
    transform: none;
}

.contact-form .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.contact-form .btn-primary:disabled:hover {
    background-color: var(--color-accent);
    transform: none;
    box-shadow: var(--shadow-md);
}

/* Loading States */
.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #e2e8f0;
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-state,
.empty-state,
.error-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-light);
}

.state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.state-message {
    font-size: 1.1rem;
    margin: 0;
}

/* Animation Classes */
.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.repo-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.repo-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Component Loading States */
.component-loading {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: var(--space-xl);
}

.component-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    margin: var(--space-md) 0;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 0.875rem;
}

/* Component fade-in animation */
.component-loaded {
    animation: componentFadeIn 0.5s ease-in-out;
}

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

/* Enhanced Repository Cards */
.repo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.repo-card .repo-title a:hover {
    color: var(--color-primary);
}

.language-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}
