/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* Auth Container */
.auth-container {
    background-color: #2d2d2d;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    border: 1px solid #444;
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #ffffff;
    font-size: 2.2em;
    font-weight: 300;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #f0f0f0;
    font-weight: 400;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #cccccc;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #555;
    border-radius: 6px;
    background-color: #3a3a3a;
    color: #ffffff;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #ffffff;
    color: #1a1a1a;
    width: 100%;
}

.btn-primary:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #555;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #666;
    transform: translateY(-1px);
}

.switch-form {
    text-align: center;
    margin-top: 20px;
    color: #cccccc;
}

.switch-form a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

.switch-form a:hover {
    text-decoration: underline;
}

/* Profile Styles */
.profile-container {
    background-color: #2d2d2d;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    border: 1px solid #444;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #555;
}

.profile-header h1 {
    color: #ffffff;
    font-size: 2em;
    font-weight: 300;
}

.profile-display {
    background-color: #3a3a3a;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.profile-display h2 {
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 400;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #555;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item label {
    color: #cccccc;
    font-weight: 500;
}

.info-item span {
    color: #ffffff;
}

.profile-edit {
    background-color: #3a3a3a;
    padding: 30px;
    border-radius: 8px;
}

.profile-edit h2 {
    color: #ffffff;
    margin-bottom: 25px;
    font-weight: 400;
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.form-buttons .btn {
    flex: 1;
    width: auto;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #555;
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Messages */
.message {
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background-color: #2d4a2d;
    color: #90ee90;
    border: 1px solid #4a6f4a;
}

.message.error {
    background-color: #4a2d2d;
    color: #ff6b6b;
    border: 1px solid #6f4a4a;
}

.message.info {
    background-color: #2d3a4a;
    color: #87ceeb;
    border: 1px solid #4a5f6f;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .auth-container,
    .profile-container {
        padding: 25px;
    }
    
    .profile-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .info-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
}

/* Focus styles für bessere Zugänglichkeit */
.btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Hover effects für bessere UX */
.info-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.form-group input:hover {
    border-color: #666;
}

/* Transitions für smooth animations */
.form-container, .profile-display, .profile-edit {
    transition: all 0.3s ease;
}

/* Dark theme adjustments */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #3a3a3a inset;
    -webkit-text-fill-color: #ffffff !important;
}

/* ======================================
   DANGER ZONE & MODAL STYLES
   ====================================== */

/* Account-Verwaltung Zone (ehemals Danger Zone) */
.danger-zone {
    margin-top: 40px;
    padding: 30px;
    border: 1px solid #6c757d;
    border-radius: 8px;
    background-color: rgba(108, 117, 125, 0.1);
}

.danger-title {
    color: #6c757d;
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 500;
}

.danger-description {
    color: #999;
    margin: 0 0 20px 0;
    font-size: 14px;
}

/* Deaktivieren-Button im gleichen Stil wie btn-secondary */
#deactivateAccountBtn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: 500;
}

#deactivateAccountBtn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

#deactivateAccountBtn:active {
    transform: translateY(0);
}

/* Behalte btn-danger für andere Zwecke falls nötig */
.btn-danger {
    background-color: #d63031 !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(214, 48, 49, 0.4) !important;
}

.btn-danger:hover {
    background-color: #b71c1c !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(214, 48, 49, 0.6) !important;
}

.btn-danger:disabled {
    background-color: #555 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    transform: none !important;
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: #2d2d2d;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
}

.modal-header {
    padding: 24px 24px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #555;
    padding-bottom: 16px;
}

.modal-header h3 {
    margin: 0;
    color: #ff6b6b;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #cccccc;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background-color: #3a3a3a;
    color: #ffffff;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin: 0 0 16px 0;
    color: #ffffff;
}

.modal-body ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
    color: #cccccc;
}

.modal-body ul li {
    margin: 8px 0;
}

.modal-body input {
    width: 100%;
    padding: 12px;
    border: 2px solid #555;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 8px;
    box-sizing: border-box;
    background-color: #3a3a3a;
    color: #ffffff;
}

.modal-body input:focus {
    outline: none;
    border-color: #ff6b6b;
}

.modal-footer {
    padding: 0 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 120px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .danger-zone {
        margin-top: 30px;
        padding: 20px;
    }
}

/* ======================================
   STRIPE INTEGRATION STYLES
   ====================================== */

/* Stripe Actions Container */
.stripe-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #555;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stripe-actions .btn {
    flex: 1;
    min-width: 120px;
    font-size: 14px;
    padding: 10px 16px;
    white-space: nowrap;
}

/* Ensure equal button sizes */
#stripeManageBtn,
#stripeRefreshBtn {
    flex: 1;
    min-width: 140px;
}

/* Stripe Status Indicators */
#stripeStatus {
    font-weight: 500;
}

#stripeStatus.connected {
    color: #90ee90;
}

#stripeStatus.not-connected {
    color: #ff6b6b;
}

#stripeStatus.loading {
    color: #ffd700;
}

#stripeStatus.error {
    color: #ff6b6b;
}

/* Stripe Customer ID styling */
#stripeCustomerId {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #cccccc;
}

/* Mobile Stripe Actions */
@media (max-width: 768px) {
    .stripe-actions {
        flex-direction: column;
    }
    
    .stripe-actions .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}