/* Basis-Styling */
body {
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: #1c2122;
    color: #e6eaee;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Login- und Register-Seiten */
body.login-page,
body.register-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/static/1.webp') no-repeat center center fixed;
    background-size: cover;
    position: relative;
}

body.login-page::before,
body.register-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1;
}

/* Container */
.container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    box-sizing: border-box;
    padding: 30px;
}

/* Login- und Register-Container */
.login-container,
.register-container {
    background: rgba(36, 41, 42, 0.95);
    border-radius: 12px;
    padding: 50px;
    width: 420px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    border: 1px solid #323839;
    z-index: 2;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #24292a;
    color: #e6eaee;
    height: 100vh;
    padding: 30px;
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid #323839;
    box-sizing: border-box;
    z-index: 2;
}

.sidebar a {
    color: #e6eaee;
    text-decoration: none;
    display: block;
    padding: 14px 18px;
    margin-bottom: 12px;
    border-radius: 6px;
    transition: background 0.3s ease, color 0.3s ease;
}

.sidebar a:hover {
    background: #323839;
    color: #f0c674;
}

.sidebar a.logout {
    color: #e88e9a;
}

.sidebar a.logout:hover {
    background: #e88e9a20;
}

/* Content */
.content {
    margin-left: 280px;
    padding: 50px;
    flex-grow: 1;
    background: #24292a;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
    min-height: 100vh;
}

/* Typografie */
h1 {
    font-size: 2rem;
    margin-bottom: 35px;
    color: #d8e0e5;
    font-weight: 500;
    letter-spacing: 0.5px;
}

h2 {
    color: #d8e0e5;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.6rem;
    font-weight: 500;
}

h3 {
    color: #b8c4ca;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Tiles */
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    width: 100%;
}

.tile {
    background: #24292a;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    border: 1px solid #323839;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tile:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.tile p {
    margin: 10px 0;
    font-size: 1rem;
    color: #e6eaee;
}

/* Buttons */
input[type="submit"],
.submit-style,
.tile button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #5c6e7a, #4a5e6b);
    border: none;
    border-radius: 6px;
    color: #e6eaee;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: auto;
}

input[type="submit"]:hover,
.submit-style:hover,
.tile button:hover {
    background: linear-gradient(135deg, #6e8290, #5b7280);
    transform: translateY(-2px);
}

/* Inputs */
input[type="text"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #323839;
    border-radius: 6px;
    background: #2c3132;
    color: #e6eaee;
    font-size: 1rem;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
    border-color: #f0c674;
    outline: none;
    background: #363c3d;
}

/* Wallet-Balance-Tile */
.wallet-balance-tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.wallet-balance-tile .balance {
    font-size: 2.8rem;
    font-weight: 600;
    color: #f0c674;
    margin: 15px 0;
}

/* Transaktionen */
.transactions-container {
    max-height: 140px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    flex-grow: 1;
}

.transactions-container.expanded {
    max-height: none;
}

/* Formulare */
form {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Trigger Styling */
details {
    margin-bottom: 25px;
    background: #2c3132;
    border-radius: 8px;
    border: 1px solid #323839;
    overflow: hidden;
    transition: background 0.3s ease;
}

details[open] {
    background: #363c3d;
}

summary {
    padding: 18px 25px;
    font-size: 1.2rem;
    color: #e6eaee;
    cursor: pointer;
    background: #24292a;
    border-bottom: 1px solid #323839;
    outline: none;
    transition: background 0.3s ease;
    position: relative;
}

summary:hover {
    background: #323839;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '▶';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #f0c674;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: translateY(-50%) rotate(90deg);
}

.trigger-content {
    padding: 25px;
    background: #2c3132;
}

.trigger-content label {
    display: block;
    margin: 12px 0 6px 0;
    color: #b8c4ca;
    font-size: 1rem;
}

/* Position Canvas */
#positionCanvas {
    width: 960px;
    height: 540px;
    background: #1c2122;
    border: 2px solid #323839;
    margin: 25px 0;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#gifPreview {
    position: absolute;
    max-width: 250px;
    cursor: move;
    user-select: none;
    border: 1px solid #f0c674;
    border-radius: 6px;
}

/* QR-Frame (Wiederhergestellt) */
.qr-frame {
    width: 100%; /* Volle Breite des Containers */
    height: 80vh; /* 80% der Bildschirmhöhe */
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    background: #fff; /* Weißer Hintergrund für den Iframe-Inhalt */
}

/* Chatbot */
#chatbot-icon {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    background: #5c6e7a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 1000;
}

#chatbot-icon:hover {
    background: #6e8290;
}

#chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 340px;
    height: 420px;
    background: #24292a;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    border: 1px solid #323839;
    z-index: 1000;
}

#chatbot-header {
    background: #5c6e7a;
    color: #e6eaee;
    padding: 12px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    font-weight: 500;
}

#chatbot-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    color: #e6eaee;
}

#chatbot-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #323839;
}

#chatbot-input input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #323839;
    border-radius: 6px;
    margin-right: 10px;
    background: #2c3132;
    color: #e6eaee;
    box-sizing: border-box;
}

#chatbot-input button {
    padding: 10px 18px;
    background: #5c6e7a;
    border: none;
    border-radius: 6px;
    color: #e6eaee;
    cursor: pointer;
}

#chatbot-input button:hover {
    background: #6e8290;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #24292a;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    text-align: center;
    border: 1px solid #323839;
}

.modal-content img {
    width: 160px;
    height: 160px;
}

.modal-content button {
    margin-top: 20px;
    background: #5c6e7a;
    padding: 10px 18px;
    border-radius: 6px;
}

/* QR-Code */
.qr-code {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    cursor: pointer;
}

/* Masked Container */
.masked-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.eye-icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
    filter: invert(90%) sepia(20%) saturate(600%) hue-rotate(180deg) brightness(100%) contrast(95%);
}

/* Flash Messages */
.flash-success {
    color: #7fc992;
    font-weight: 500;
    text-align: center;
    margin: 15px 0;
}

.flash-error {
    color: #e88e9a;
    font-weight: 500;
    text-align: center;
    margin: 15px 0;
}

.delete-btn {
    cursor: pointer;
    color: red;
    font-weight: bold;
    margin-left: 10px;
    display: inline-block;
}
.paypal-info {
    margin-top: 10px;
}

/* Loader für Login */
.login-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid #f0c674;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 3;
}

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

/* Loader für andere Seiten */
.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    z-index: 3;
    display: none;
}

.gear {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 5px solid #f0c674;
    border-radius: 50%;
    animation: spinGear 2s linear infinite;
}

.gear1 {
    top: 0;
    left: 0;
}

.gear2 {
    top: 0;
    right: 0;
    animation-direction: reverse;
}

.gear3 {
    bottom: 0;
    left: 0;
    animation-duration: 1.5s;
}

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

/* Nachricht */
.message {
    color: #e6eaee;
    text-align: center;
    margin: 25px 0;
    font-size: 1.2rem;
}

/* Links */
a {
    color: #f0c674;
    text-decoration: none;
    display: block;
    text-align: center;
    margin-top: 25px;
    transition: color 0.3s ease;
}

a:hover {
    color: #d8b55b;
}

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

.login-container,
.register-container,
.tile,
.sidebar {
    animation: fadeIn 0.5s ease-in-out;
}
