
:root {
--bg-color: #141420;
--card-bg: rgba(255, 255, 255, 0.03);
--border-color: rgba(255, 255, 255, 0.08);
--accent: #7e86f9;
}

body {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
background: var(--bg-color);
font-family: 'Inter', system-ui, sans-serif;
overflow: hidden;
color: #fff;
}

@property --gradient-angle {
syntax: '<angle>';
initial-value: 0deg;
inherits: false;
}
.container {
position: relative;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
}

/* Organic Floating Blobs */
.blob {
position: absolute;
background: linear-gradient(45deg, #f72359, var(--accent));
border-radius: 50%;
filter: blur(40px);
opacity: 0.6;
mix-blend-mode: screen;
animation: floatAround 12s infinite alternate ease-in-out;
}

.blob-1 {
width: 250px;
height: 250px;
top: 20%;
left: 25%;
}

.blob-2 {
width: 300px;
height: 300px;
bottom: 15%;
right: 20%;
background: linear-gradient(45deg, #00f2fe, #4facfe);
animation-delay: -4s;
}

/* Liquid Glass Card Structure */
.glass-card {
    position: relative;
    width: 360px;
    padding: 24px;
    /* background: var(--card-bg); */
    background: #0a0a12;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 7px 21px rgba(0, 0, 0, 0.3);
    z-index: 10;
    overflow: hidden;
}

.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}

.card-header h3 {
margin: 0;
font-size: 1.1rem;
letter-spacing: 0.5px;
opacity: 0.8;
}

.status-dot {
width: 8px;
height: 8px;
background: #39ff14;
border-radius: 50%;
box-shadow: 0 0 10px #39ff14;
transition: background 0.3s, box-shadow 0.3s;
}

/* Glass Display */
.display-panel {
background: rgba(0, 0, 0, 0.2);
padding: 18px;
border-radius: 14px;
margin-bottom: 20px;
border: 1px solid rgba(255, 255, 255, 0.05);
font-family: monospace;
color: #00f2fe;
transition: color 0.3s;
min-height: 85px;
}

/* New Input Styles matching the Glass Design */
.input-wrapper {
position: relative;
margin-bottom: 14px;
}

.input-icon {
position: absolute;
left: 14px;
top: 50%;
transform: translateY(-50%);
color: rgba(255, 255, 255, 0.4);
font-size: 1.2rem;
}

/* Standard Glass-Input Design */
.glass-input {
width: 100%;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.02) !important; /* Wichtig für die Transparenz */
border: 1px solid var(--border-color);
padding: 14px 14px 14px 42px;
color: #fff !important;
border-radius: 12px;
font-size: 0.95rem;
outline: none;
transition: background 0.3s, border-color 0.3s;
}

.glass-input:focus {
background: rgba(255, 255, 255, 0.06) !important;
border-color: rgba(255, 255, 255, 0.25);
}

.glass-input:-webkit-autofill,
.glass-input:-webkit-autofill:hover, 
.glass-input:-webkit-autofill:focus, 
.glass-input:-webkit-autofill:active {
/* Nutzt einen massiven Box-Shadow nach innen, um die Browserfarbe zu überlagern */
-webkit-box-shadow: 0 0 0 1000px rgba(15, 15, 25, 0.6) inset !important;
-webkit-text-fill-color: #fff !important;
border: 1px solid var(--border-color) !important;
transition: background-color 5000s ease-in-out 0s;
}

/* Interactive Grid Keypad */
.keypad {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
margin-top: 20px;
}

.key {
position: relative;
background: rgba(255, 255, 255, 0.02);
border: 1px solid var(--border-color);
padding: 16px;
color: #fff;
border-radius: 12px;
cursor: pointer;
font-weight: 500;
overflow: hidden;
transition: background 0.3s, transform 0.1s;
font-family: inherit;
font-size: 0.95rem;
}

.key:hover {
background: rgba(255, 255, 255, 0.08);
}

.key:active {
transform: scale(0.97);
}

.action-btn {
background: rgba(247, 35, 89, 0.15);
border-color: rgba(247, 35, 89, 0.3);
color: #f72359;
}

.action-btn:hover {
background: rgba(247, 35, 89, 0.25);
}

/* Mouse tracking light element inside buttons */
.glow {
position: absolute;
width: 100px;
height: 100px;
background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
top: var(--y, 0);
left: var(--x, 0);
transform: translate(-50%, -50%);
pointer-events: none;
opacity: 0;
transition: opacity 0.3s;
}

.key:hover .glow {
opacity: 1;
}

/* Animations */
@keyframes floatAround {
0% { transform: translate(0, 0) scale(1); }
50% { transform: translate(40px, -60px) scale(1.2); }
100% { transform: translate(-20px, 20px) scale(0.9); }
}


/* =======================================================
   SPLASH-SCREEN / PRELOADER STYLES (Glassmorphism)
   ======================================================= */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.loader-title {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.loader-status {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 25px;
    opacity: 0.8;
}

/* Die äußere Schiene des Ladebalkens */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

/* Der eigentliche, animierte Ladebalken */
.progress-bar-fill {
    height: 100%;
    width: 0%; /* Startet bei 0 */
    background: linear-gradient(90deg, #00f2fe, var(--accent));
    border-radius: 10px;
    transition: width 0.2s ease; /* Macht die Bewegung flüssig */
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.progress-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-family: monospace;
}

/* =======================================================
   DASHBOARD CONTENT GRID & STAPEL-DESIGN
   ======================================================= */
.dashboard-container {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    z-index: 10;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 24px;
    width: 100%;
    box-sizing: border-box;
}

.user-profile { display: flex; align-items: center; gap: 10px; }
.btn-logout { display: flex; align-items: center; gap: 5px; font-size: 0.9rem; text-decoration: none; }
.btn-admin { display: flex; align-items: center; gap: 5px; font-size: 0.9rem; text-decoration: none; background: rgba(241, 196, 15, 0.15) !important; color: #f1c40f !important; border: 1px solid rgba(241, 196, 15, 0.3) !important; }
.btn-admin:hover { background: rgba(241, 196, 15, 0.3) !important; }

.gallery-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    width: 100%;
    margin-top: 20px;
}

.album-card {
    background: rgba(255, 255, 255, 0.05); 
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12); 
    border-radius: 24px;
    padding: 25px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #ffffff; 
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.stack-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scatter-tile {
    position: absolute;
    background: #ffffff;
    padding: 6px; 
    border-radius: 18px; 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    width: 120px; 
    height: 120px;
    transform-origin: center center;
    transition: transform 0.3s ease;
}

.scatter-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.album-title {
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    margin-top: 8px;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.album-description {
    font-size: 0.85rem;
    opacity: 0.6;
    text-align: center;
    margin-top: 5px;
    line-height: 1.3;
    max-width: 90%;
}

/* Scatter-Effekt Verteilung */
.scatter-tile:nth-child(1) { transform: translate(-28px, -18px) rotate(-16deg); z-index: 1; }
.scatter-tile:nth-child(2) { transform: translate(22px, -22px) rotate(20deg); z-index: 2; }
.scatter-tile:nth-child(3) { transform: translate(-18px, 18px) rotate(-11deg); z-index: 3; }
.scatter-tile:nth-child(4) { transform: translate(26px, 14px) rotate(14deg); z-index: 4; }
.scatter-tile:nth-child(5) { transform: translate(0px, 0px) rotate(3deg); z-index: 5; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4); }

/* Hover Auffächerung */
.album-card:hover .scatter-tile:nth-child(1) { transform: translate(-35px, -24px) rotate(-22deg); }
.album-card:hover .scatter-tile:nth-child(2) { transform: translate(30px, -30px) rotate(26deg); }
.album-card:hover .scatter-tile:nth-child(3) { transform: translate(-24px, 24px) rotate(-15deg); }
.album-card:hover .scatter-tile:nth-child(4) { transform: translate(32px, 18px) rotate(18deg); }
.album-card:hover .scatter-tile:nth-child(5) { transform: translate(0px, 0px) rotate(0deg); }

/*/* Styling für die Vorschau VOR dem Upload */
/*.preview-upload-card { position: relative; border-radius: 8px; overflow: hidden; height: 100px; border: 2px dashed rgba(255,255,255,0.2); background: rgba(0,0,0,0.2); }
.preview-upload-card img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove-btn { position: absolute; top: 3px; right: 3px; background: rgba(231, 76, 60, 0.9); border: none; border-radius: 50%; width: 22px; height: 22px; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; box-shadow: 0 2px 4px rgba(0,0,0,0.5); transition: background 0.2s; }
.preview-remove-btn:hover { background: #ff4d4d; }*/*/
/* Styling für die Vorschau VOR dem Upload */
.preview-upload-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); 
    gap: 12px; 
    margin-top: 15px;
}

.preview-upload-card { 
    position: relative; 
    border-radius: 8px; 
    overflow: hidden; 
    height: 100px; /* Feste Höhe für die Kachel */
    width: 100%;   /* Nutzt die Breite des Grids */
    border: 2px dashed rgba(255,255,255,0.2); 
    background: rgba(0,0,0,0.4); 
}

/* HIER IST DIE RETTUNG: Erzwingt die Thumbnail-Größe für das originale Riesenbild */
.preview-upload-card img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* Schneidet das Bild quadratisch zu, ohne es zu verzerren */
    display: block;
}

.preview-remove-btn { 
    position: absolute; 
    top: 4px; 
    right: 4px; 
    background: rgba(231, 76, 60, 0.95); 
    border: none; 
    border-radius: 50%; 
    width: 24px; 
    height: 24px; 
    color: white; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 14px; 
    font-weight: bold; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.6); 
    transition: background 0.2s, transform 0.1s; 
    z-index: 10;
}

.preview-remove-btn:hover { 
    background: #ff4d4d; 
    transform: scale(1.1);
}
/* Styling für die Vorschau VOR dem Upload */
.preview-upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; margin-top: 15px; }
.preview-upload-card { position: relative; border-radius: 8px; overflow: hidden; height: 100px; width: 100%; border: 2px dashed rgba(255,255,255,0.2); background: rgba(0,0,0,0.4); }
.preview-upload-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-remove-btn { position: absolute; top: 4px; right: 4px; background: rgba(231, 76, 60, 0.95); border: none; border-radius: 50%; width: 24px; height: 24px; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; box-shadow: 0 2px 6px rgba(0,0,0,0.6); z-index: 10; }

/* Fortschritts-Anzeige direkt auf der Bildkachel */
.card-progress-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 0%; /* Wird per JS gesteuert (0% bis 100%) */
    background: rgba(46, 204, 113, 0.7); /* Grüner Schleier */
    transition: height 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Klicks gehen durch */
}
.card-progress-text {
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    display: none; /* Wird erst aktiv beim Hochladen */
}
/* Fancy-Löscheffekt für bereits gespeicherte Bilder */
.gallery-photo-item {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
    opacity: 1;
}

.gallery-photo-item.deleting {
    transform: scale(0.01) rotate(15deg);
    opacity: 0;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* =========================================================================
 FANCY FILE BUTTON & DRAG CONTAINER STYLE
 ========================================================================= */
.fancy-file-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  width: 100%;
}
/* Das hässliche Standard-Input wird unsichtbar gemacht */
.hidden-file-input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}
/* Unser neues, gestyltes Label agiert als glänzender Button */
.fancy-file-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  backdrop-filter: blur(5px);
}
.fancy-file-label i {
  font-size: 1.3rem;
  color: var(--accent, #3498db);
  transition: transform 0.3s ease;
}
.fancy-file-label:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.08));
  border-color: var(--accent, #3498db);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}
.fancy-file-label:hover i {
  transform: translateY(-2px);
}
/* Badge für die Anzahl der selektierten Dateien */
.file-counter-badge {
  font-size: 0.85rem;
  background: rgba(0,0,0,0.4);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  display: none;
}
/* Style für das doppelte Absicherungs-Overlay */
.delete-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); z-index: 1000; align-items: center; justify-content: center; }
.delete-modal-content { background: #222; border: 1px solid #ff4d4d; border-radius: 16px; max-width: 500px; width: 90%; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); color: white; animation: modalAnim 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes modalAnim { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }