/* style2.css */
/* Zusätzliche Styles für: register.php, login.php, index.php, activate.php */

/* Grundlayout */
body {
    background: #f7fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2d3748;
}

.container,
.login-shell,
.activate-box {
    width: min(920px, calc(100% - 32px));
    margin: 40px auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* Karten / Boxen */
.form-card,
.login-card,
.pay-banner,
.code-box,
.frame-code,
.service-wrap,
.upload-box,
.color-box {
    background: #ffffff;
    border: 1px solid #e8edf5;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.form-card,
.login-card {
    padding: 30px;
}

/* Header / Intro */
.intro-section {
    text-align: center;
    margin-bottom: 28px;
}

.intro-section h1,
.hero-title {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-weight: 800;
    line-height: 1.2;
}

.intro-section p {
    margin: 0 0 8px 0;
    color: #4a5568;
    line-height: 1.6;
}

/* Navbar / Footer */
.navbar {
    background: #2c3e50;
    color: #ffffff;
    padding: 15px 20px;
    box-sizing: border-box;
    text-align: center;
    font-weight: 700;
}

.main-footer {
    background: #2c3e50 !important;
    color: #ffffff !important;
    text-align: center;
    flex: 1;
    padding: 30px 20px;
    margin-top: 60px;
    box-sizing: border-box;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a,
.footer-link {
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 500;
    opacity: 0.92;
}

.footer-links a:hover,
.footer-link:hover {
    opacity: 1;
    text-decoration: underline !important;
}

/* Formulare */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label,
.field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #2c3e50;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d9dee8;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.4;
    box-sizing: border-box;
    background: #ffffff;
    color: #2d3748;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    min-height: 46px;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    border-color: #ef7d00;
    box-shadow: 0 0 0 3px rgba(239, 125, 0, 0.16);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Buttons */
.btn,
button,
.btn-submit,
.btn-cta-primary,
.btn-cta-secondary {
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-submit,
.btn-cta-primary {
    background: linear-gradient(135deg, #ef7d00 0%, #ff9b2f 100%);
    color: #ffffff;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 4px 14px rgba(239, 125, 0, 0.24);
}

.btn-submit:hover,
.btn-cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(239, 125, 0, 0.32);
}

.btn-cta-secondary {
    background: #ffffff;
    color: #2c3e50;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 700;
    border: 2px solid #2c3e50;
    display: inline-block;
}

.btn-cta-secondary:hover {
    background: #2c3e50;
    color: #ffffff;
}

/* Registrierung / Login */
.login-alert,
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 700;
    text-align: center;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 700;
    text-align: center;
}

.register-wrapper {
    padding: 60px 20px;
    background: #fafcff;
}

.login-shell {
    max-width: 500px;
}

.login-card {
    padding: 24px;
}

/* Index.php: Baukasten */
.service-row {
    display: grid;
    grid-template-columns: 170px 1fr 170px 54px;
    gap: 10px;
    margin-bottom: 10px;
    align-items: stretch;
}

.service-type,
.service-name,
.service-price {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    font-size: 16px;
    min-height: 46px;
    padding: 12px 14px;
}

.service-name::placeholder,
.service-price::placeholder {
    color: #a7b0bf;
}

.service-wrap,
.upload-box,
.color-box {
    padding: 14px;
    border: 1px solid #ef7d00;
    background: linear-gradient(180deg, #fff7ef 0%, #ffffff 100%);
    margin-bottom: 14px;
}

.field-help {
    display: block;
    font-size: 0.85rem;
    color: #7b8794;
    margin-top: 6px;
    line-height: 1.4;
}

.editor-shell {
    border: 1px solid #d9dee8;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.ql-toolbar.ql-snow {
    border: none;
    border-bottom: 1px solid #d9dee8;
    background: #f8fafc;
}

.ql-container.ql-snow {
    border: none;
    font-size: 16px;
}

.ql-editor {
    min-height: 200px;
    resize: vertical;
    overflow: auto;
}

/* Code / Einbindung */
.code-section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 8px;
}

.code-hint {
    font-size: 0.92rem;
    color: #718096;
    margin-bottom: 10px;
    line-height: 1.5;
}

.code-box,
.frame-code {
    background: #2d3748;
    color: #f7fafc;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #4a5568;
    overflow-x: auto;
    position: relative;
}

.code-box pre,
.frame-code pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    padding-right: 80px;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: #ffac75;
    color: #2d3748;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.copy-btn:hover {
    filter: brightness(1.05);
}

.copy-btn.copied {
    background: #27ae60;
    color: #ffffff;
}

/* Premium / Hinweisboxen */
.pay-banner {
    background: linear-gradient(180deg, #fff8e8 0%, #ffffff 100%);
    color: #856404;
    border: 1px solid #ffe3a3;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 30px;
}

/* Aktivierung */
.activate-box {
    max-width: 500px;
    margin: 60px auto;
}

/* Responsive */
@media (max-width: 900px) {
    .container,
    .login-shell,
    .activate-box {
        width: min(100%, calc(100% - 24px));
        padding: 0 12px;
    }

    .form-card,
    .login-card {
        padding: 22px;
    }

    .service-row {
        grid-template-columns: 1fr;
    }

    .copy-btn {
        position: static;
        margin-bottom: 12px;
        display: inline-block;
    }

    .code-box pre,
    .frame-code pre {
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .intro-section h1,
    .hero-title {
        font-size: 1.8rem;
    }

    .footer-links {
        gap: 12px;
    }

    .main-footer {
        padding: 24px 16px;
    }

    /* WICHTIG: Inputs auf Handy luftiger und besser lesbar */
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="tel"],
    select,
    textarea,
    .service-type,
    .service-name,
    .service-price {
        font-size: 16px !important;
        line-height: 1.45;
        padding: 14px 16px;
        min-height: 50px;
    }

    .service-name,
    .service-price {
        overflow: visible;
        text-overflow: clip;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .service-wrap,
    .upload-box,
    .color-box {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .container,
    .login-shell,
    .activate-box {
        width: calc(100% - 16px);
        padding: 0 8px;
    }

    .form-card,
    .login-card {
        padding: 18px;
        border-radius: 10px;
    }

    .btn-submit,
    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
    }

    /* Extra für Mobile: Eingabefelder deutlich komfortabler */
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="tel"],
    select,
    textarea,
    .service-type,
    .service-name,
    .service-price {
        font-size: 16px !important;
        padding: 14px 15px;
        min-height: 52px;
        border-radius: 10px;
    }

    .form-group label,
    .field-label {
        font-size: 0.98rem;
    }
}
