/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes floatDelayed {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(-15px) translateX(5px);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-fade-in-delayed {
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-up-delayed {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.animate-fade-in-up-delayed-2 {
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.animate-fade-in-up-delayed-3 {
    animation: fadeInUp 0.8s ease-out 1.2s both;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-delayed {
    animation: floatDelayed 4s ease-in-out infinite 1s;
}

.animate-float-slow {
    animation: floatSlow 5s ease-in-out infinite 2s;
}

/* Glass Morphism Effect */
.glass-morphism {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Custom Button Styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #ec4899, #f97316);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.6);
    background: linear-gradient(135deg, #db2777, #ea580c);
    color: white;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    border: 2px solid #ec4899;
    color: #ec4899;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #ec4899, #f97316);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: white;
    background: linear-gradient(135deg, #ec4899, #f97316, #eab308);
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.5);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(236, 72, 153, 0.7);
    color: white;
}

.btn-secondary-large {
    display: inline-flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1.125rem;
    border: 2px solid #ec4899;
    color: #ec4899;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary-large:hover {
    background: rgba(236, 72, 153, 0.1);
    transform: translateY(-2px);
    color: #ec4899;
}

/* Photo Frame Effects */
.photo-frame {
    transition: all 0.3s ease;
    cursor: pointer;
}

.photo-frame:hover {
    transform: translateY(-5px);
}

.photo-frame-large {
    transition: all 0.3s ease;
    cursor: pointer;
}

.photo-frame-large:hover {
    transform: translateY(-8px);
}

.photo-frame .group:hover {
    transform: scale(1.02);
}

/* Feature Cards */
.feature-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Floating Shapes Background */
.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(249, 115, 22, 0.1));
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 160px;
    height: 160px;
    bottom: 20%;
    left: 5%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 30%;
    right: 10%;
    animation-delay: 1s;
}

.shape-5 {
    width: 60px;
    height: 60px;
    top: 50%;
    left: 50%;
    animation-delay: 3s;
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .btn-hero {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-secondary-large {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 3rem;
        height: 3rem;
        margin-bottom: 1rem;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
    background-color: rgba(255, 255, 255, 0.95);
}

.form-input::placeholder {
    color: #9ca3af;
}

.error-message {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #dc2626;
}

/* Auth Page Specific Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    z-index: 10;
}

.auth-card {
    width: 100%;
    max-width: 28rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 50%, #f97316 100%);
    border-radius: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.3);
}

/* Success/Status Messages */
.status-message {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 0.75rem;
    color: #059669;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

/* Link Styles for Auth Pages */
.auth-link {
    color: #ec4899;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #be185d;
    text-decoration: underline;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    color: #6b7280;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.back-link:hover {
    color: #ec4899;
}

.back-link svg {
    transition: transform 0.2s ease;
}

.back-link:hover svg {
    transform: translateX(-0.25rem);
}

/* Feature Cards in Register */
.feature-preview {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.feature-preview-item {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: transform 0.2s ease;
}

.feature-preview-item:hover {
    transform: translateY(-2px);
}

.feature-preview-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
}

.feature-preview-text {
    font-size: 0.75rem;
    color: #4b5563;
    font-weight: 500;
}

/* Divider */
.divider {
    position: relative;
    margin: 2rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e5e7eb;
}

.divider-text {
    position: relative;
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 0 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Trust Indicators */
.trust-indicators {
    margin-top: 2rem;
    text-align: center;
}

.trust-indicators-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.trust-indicator {
    display: flex;
    align-items: center;
}

.trust-indicator svg {
    margin-right: 0.25rem;
    color: #10b981;
}

/* Terms and Privacy Notice */
.terms-notice {
    font-size: 0.875rem;
    color: #6b7280;
    background: linear-gradient(135deg, #fdf2f8 0%, #fef3e2 100%);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(236, 72, 153, 0.1);
    margin: 1.5rem 0;
}

.terms-notice p {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.terms-notice svg {
    margin-top: 0.125rem;
    color: #ec4899;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .auth-card {
        max-width: 100%;
        margin: 0 1rem;
    }
    
    .feature-preview {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .trust-indicators-list {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Dashboard Specific Styles */

/* Sidebar Navigation */
.sidebar-dashboard {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    gap: 0.75rem;
}

.nav-link:hover {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
    transform: translateX(2px);
}

.nav-link-active {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(249, 115, 22, 0.1));
    color: #ec4899;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
}

/* Header Styles */
.search-input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(236, 72, 153, 0.2);
    border-radius: 0.75rem;
    width: 250px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #ec4899;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.btn-quick-action {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #ec4899, #f97316);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-quick-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.notification-btn {
    position: relative;
    padding: 0.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(236, 72, 153, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
}

.notification-btn:hover {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ec4899, #f97316);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    transform: translate(25%, -25%);
}

.user-profile-btn {
    padding: 0.25rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(236, 72, 153, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile-btn:hover {
    background: rgba(236, 72, 153, 0.05);
}

/* Dashboard Cards */
.dashboard-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

.dashboard-welcome-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(31, 38, 135, 0.1);
}

/* Stats Cards */
.stat-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* Album Cards */
.album-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.album-cover {
    padding: 0.5rem 0.5rem 0;
}

.album-info {
    padding: 1rem;
}

/* Quick Actions */
.quick-action-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.75rem;
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quick-action-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-action-content {
    text-align: left;
}

.quick-action-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
}

.quick-action-desc {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Activity Feed */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.activity-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.875rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard-welcome-card,
    .dashboard-card {
        padding: 1rem;
        border-radius: 1rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .search-input {
        width: 200px;
    }
}

/* Force upload page layout constraints */
.upload-page main,
body:has([title="Upload Photos"]) main {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    contain: layout style paint !important;
}

.upload-page .space-y-6,
body:has([title="Upload Photos"]) .space-y-6 {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.upload-page .dashboard-card,
body:has([title="Upload Photos"]) .dashboard-card {
    position: relative !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Ensure upload dropzone stays contained */
.upload-dropzone {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}
