:root {
    --primary: #4ecdc4;
    --primary-gradient: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    --navbar-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary: #ff6b6b;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #666;
    --border-radius: 20px;
    --shadow-sm: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
}

body {
    background-color: var(--bg-color);
    font-family: 'Arial', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
}

h1, h2, h3, h4, h5 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-main);
}

/* Utils */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn {
    border-radius: 25px;
    padding: 0.8rem 1.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #ff8080, #5de0d7); /* Slightly lighter gradient on hover */
}

.btn-outline-secondary {
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
}

.btn-outline-secondary:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    border-color: rgba(255,255,255,0.5);
}

.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    background-color: var(--card-bg);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Login Section */
#login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--navbar-gradient);
    margin: 0;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

#login-section .card {
    box-shadow: var(--shadow-lg);
    border-radius: 20px;
}

#login-section h2 {
    color: #2c3e50;
}

/* Header */
.app-header {
    background: var(--navbar-gradient);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    color: white !important;
    font-weight: bold;
}

.navbar-brand i {
    color: #4ecdc4 !important; /* Teal accent for icon */
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    background: none;
    -webkit-text-fill-color: initial;
}

/* Upload Area */
.upload-card {
    border: 2px dashed #e5e7eb;
    background-color: #f9fafb;
    transition: all 0.2s;
    border-radius: 20px;
}

.upload-card:hover {
    border-color: var(--primary);
    background-color: #f0f7ff;
}

.upload-card i.text-primary {
    color: var(--primary) !important;
    background: -webkit-linear-gradient(135deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Gallery */
.gallery-grid {
    padding-bottom: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    cursor: pointer;
    aspect-ratio: 1 / 1;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.rotate-btn-left, .rotate-btn-right, .delete-btn {
    position: absolute;
    top: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 10;
}

.rotate-btn-left {
    left: 10px;
    color: var(--text-main);
}

.rotate-btn-right {
    left: 55px;
    color: var(--text-main);
}

.delete-btn {
    right: 10px;
    color: #ff6b6b;
}

.gallery-item:hover .rotate-btn-left, 
.gallery-item:hover .rotate-btn-right,
.gallery-item:hover .delete-btn {
    opacity: 1;
    transform: scale(1);
}

.rotate-btn-left:hover, .rotate-btn-right:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.delete-btn:hover {
    background: #ff6b6b;
    color: white;
    transform: scale(1.1);
}

/* Spinner */
.spinner-overlay {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
}

.spinner-border.text-primary {
    color: var(--primary) !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: #ff6b6b;
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoomIn {
    from {transform:scale(0.8); opacity: 0;}
    to {transform:scale(1); opacity: 1;}
}
