@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #0a0805;
    --bg2: #0f0c07;
    --card: rgba(34, 28, 15, 0.78);
    --gold: #f5b342;
    --gold-light: #ffd966;
    --gold-dark: #b8860b;
    --white: #f5f7fa;
    --muted: #b0a690;
    --border: rgba(255,215,120,0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: Inter, Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 7%;
    background: rgba(10,8,5,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span,
.footer-logo span {
    color: var(--gold);
}

nav {
    display: flex;
    gap: 35px;
    align-items: center;
}

nav a {
    color: #c9bfb0;
    font-size: 14px;
    transition: .25s;
}

nav a:hover {
    color: var(--gold);
}

.nav-button {
    padding: 11px 20px;
    border-radius: 8px;
    background: var(--gold);
    color: #1a140c !important;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.nav-button:hover {
    background: var(--gold-light);
}

.login-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold) !important;
}

.login-btn:hover {
    background: var(--gold);
    color: #1a140c !important;
}

.mobile-menu {
    display: none;
    background: none;
    border: 0;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 8px 12px;
    line-height: 1;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 150px 7% 100px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 75% 35%, rgba(245,179,66,.15), transparent 30%),
        radial-gradient(circle at 20% 70%, rgba(184,134,11,.12), transparent 30%),
        var(--bg);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,215,120,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,215,120,.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: linear-gradient(to bottom, black, transparent);
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 2;
}

.badge,
.section-header span,
.test-box span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

.hero h1 {
    font-size: clamp(55px, 8vw, 105px);
    line-height: .95;
    letter-spacing: -5px;
    margin: 25px 0;
}

.hero h1 span {
    color: transparent;
    -webkit-text-stroke: 1px var(--gold);
}

.hero-text {
    max-width: 600px;
    color: var(--muted);
    font-size: 18px;
}

.hero-stats {
    display: flex;
    gap: 50px;
    margin: 45px 0;
}

.hero-stats div {
    display: flex;
    flex-direction: column;
}

.hero-stats strong {
    font-size: 25px;
}

.hero-stats span {
    color: var(--muted);
    font-size: 12px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 15px 27px;
    border-radius: 8px;
    font-weight: 700;
    display: inline-block;
}

.btn-primary {
    background: var(--gold);
    color: #1a140c;
    box-shadow: 0 0 35px rgba(245,179,66,.2);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--gold-light);
}

.btn-secondary {
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
}

.btn-secondary:hover {
    background: rgba(255,255,255,.06);
}

section {
    padding: 120px 7%;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 65px;
}

.section-header h2 {
    font-size: clamp(35px, 5vw, 55px);
    line-height: 1;
    margin: 15px 0;
}

.section-header p {
    color: var(--muted);
}

/* ===== FEATURES ===== */
.feature-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 15px;
}

.feature-card,
.app-card,
.price-card,
.review-card {
    background: linear-gradient(
        145deg,
        rgba(255,215,120,.06),
        rgba(255,215,120,.02)
    );
    border: 1px solid var(--border);
    border-radius: 16px;
}

.feature-card {
    padding: 30px;
}

.feature-icon {
    color: var(--gold);
    font-size: 28px;
    margin-bottom: 30px;
}

.feature-card h3 {
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--muted);
    font-size: 14px;
}

/* ===== PRICING ===== */
.pricing {
    background: var(--bg2);
}

.pricing-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 15px;
}

.price-card {
    padding: 35px 28px;
    position: relative;
}

.price-card.featured {
    border-color: var(--gold);
    box-shadow: 0 0 45px rgba(245,179,66,.1);
    transform: translateY(-10px);
}

.popular {
    position: absolute;
    top: -12px;
    right: 20px;
    padding: 5px 12px;
    background: var(--gold);
    color: #1a140c;
    font-size: 10px;
    font-weight: 800;
    border-radius: 20px;
}

.duration {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.price-card h3 {
    margin: 20px 0;
    font-size: 20px;
}

.price-card h3 strong {
    font-size: 55px;
    letter-spacing: -3px;
}

.price-card h3 small {
    font-size: 18px;
}

.price-card ul {
    list-style: none;
    color: #c9bfb0;
    font-size: 14px;
}

.price-card li {
    padding: 8px 0;
}

.price-card button {
    width: 100%;
    margin-top: 25px;
    padding: 13px;
    background: transparent;
    color: white;
    border: 1px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
    font-weight: 700;
}

.price-card.featured button,
.price-card button:hover {
    background: var(--gold);
    color: #1a140c;
}

/* ===== APPS ===== */
.app-grid {
    max-width: 1000px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 20px;
}

.app-card {
    padding: 40px;
}

.app-number {
    color: var(--gold);
    font-size: 13px;
    margin-bottom: 35px;
}

.app-card h3 {
    font-size: 28px;
    margin-bottom: 12px;
}

.app-card p {
    color: var(--muted);
    margin-bottom: 25px;
}

.app-button {
    color: var(--gold);
    font-weight: 700;
}

.store-label {
    display: inline-block;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #c9bfb0;
    font-size: 13px;
}

/* ===== TEST ===== */
.test-section {
    padding-top: 40px;
}

.test-box {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 60px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 80% 50%, rgba(245,179,66,.15), transparent 35%),
        #14100a;
    border: 1px solid var(--border);
}

.test-box h2 {
    font-size: clamp(32px, 5vw, 55px);
    line-height: 1;
    margin: 15px 0;
}

.test-box p {
    color: var(--muted);
}

/* ===== REVIEWS ===== */
.reviews {
    overflow: hidden;
}

.reviews-carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviews-carousel {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.reviews-carousel::-webkit-scrollbar {
    display: none;
}

.review-card {
    flex: 0 0 320px;
    padding: 30px 28px;
    background: rgba(20,16,10,0.7);
    backdrop-filter: blur(4px);
    scroll-snap-align: start;
    transition: transform 0.3s;
}

.review-card:hover {
    transform: scale(1.02);
}

.review-card .stars {
    color: var(--gold);
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.review-card p {
    font-size: 16px;
    line-height: 1.6;
    color: #e8dfd0;
}

.review-author {
    margin-top: 18px;
    font-weight: 600;
    color: var(--gold);
}

.carousel-btn {
    background: var(--gold);
    color: #1a140c;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 28px;
    cursor: pointer;
    transition: 0.3s;
    flex-shrink: 0;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--gold-light);
    transform: scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== CONTACT ===== */
.contact {
    background: var(--bg2);
}

.contact-form {
    max-width: 750px;
    margin: auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
    color: #d4c9b8;
}

input,
select,
textarea {
    width: 100%;
    padding: 15px;
    background: #14100a;
    color: white;
    border: 1px solid var(--border);
    border-radius: 7px;
    outline: none;
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold);
}

textarea {
    resize: vertical;
}

.submit-button {
    width: 100%;
    padding: 16px;
    border: 0;
    border-radius: 7px;
    background: var(--gold);
    color: #1a140c;
    font-weight: 800;
    cursor: pointer;
}

.submit-button:hover {
    background: var(--gold-light);
}

/* ===== FOOTER ===== */
footer {
    padding: 60px 7%;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
}

footer p {
    color: var(--muted);
    margin: 10px 0 25px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    font-size: 13px;
    color: #b0a690;
}

.copyright {
    margin-top: 30px;
    color: #6a6255;
    font-size: 12px;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #14100a;
    padding: 50px;
    border-radius: 20px;
    border: 1px solid var(--gold);
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content h2 {
    color: var(--gold);
    margin-bottom: 10px;
}

.modal-content p {
    color: var(--muted);
    margin-bottom: 25px;
}

.modal-content input {
    width: 100%;
    padding: 15px;
    background: #0a0805;
    color: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

.modal-content input:focus {
    border-color: var(--gold);
    outline: none;
}

.modal-content .btn {
    width: 100%;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: var(--muted);
    cursor: pointer;
    transition: 0.2s;
}

.close:hover {
    color: var(--gold);
}

/* ===== DASHBOARD ===== */
.dashboard-content {
    max-width: 700px;
    text-align: left;
}

.dashboard-section {
    margin: 25px 0;
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.dashboard-section h3 {
    color: var(--gold);
    margin-bottom: 15px;
    font-size: 18px;
}

.device-list {
    margin-bottom: 10px;
}

/* ===== DEVICE-ITEM – MIT COPY-BUTTON IMMER SICHTBAR ===== */
.device-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid var(--gold);
    gap: 10px;
    flex-wrap: wrap;
}

.device-item .device-mac {
    font-family: monospace;
    font-size: 14px;
    color: var(--gold);
    flex-shrink: 0;
}

.device-item .device-m3u-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0; /* erlaubt shrink */
    overflow: hidden;
}

.device-item .device-m3u {
    font-size: 12px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 50px;
}

.device-item .copy-btn {
    background: rgba(245,179,66,0.15);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
    touch-action: manipulation;
    min-height: 40px;
    min-width: 60px;
}

.device-item .copy-btn:hover {
    background: var(--gold);
    color: #1a140c;
}

.help-text {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.help-text p {
    padding: 5px 0;
}

.help-text strong {
    color: var(--white);
}

.logout-btn {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: transparent;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
}

.logout-btn:hover {
    background: #ff6b6b;
    color: #1a140c;
}

/* ===== ADMIN ===== */
.admin-dashboard {
    max-width: 800px;
}

.customer-list {
    max-height: 400px;
    overflow-y: auto;
}

.customer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: 0.3s;
}

.customer-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--gold);
}

.customer-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.customer-info strong {
    color: var(--white);
    font-size: 16px;
}

.customer-email {
    color: var(--muted);
    font-size: 13px;
}

.customer-devices {
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
}

.customer-actions {
    display: flex;
    gap: 8px;
}

.customer-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.customer-actions .edit-btn {
    background: rgba(245,179,66,0.2);
    color: var(--gold);
}

.customer-actions .edit-btn:hover {
    background: var(--gold);
    color: #1a140c;
}

.customer-actions .delete-btn {
    background: rgba(255,107,107,0.15);
    color: #ff6b6b;
}

.customer-actions .delete-btn:hover {
    background: #ff6b6b;
    color: #1a140c;
}

/* ===== DEVICE ENTRIES (Add/Edit) ===== */
.device-entries {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.device-entry {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.device-entry input {
    margin-bottom: 0 !important;
    padding: 12px !important;
    font-size: 14px !important;
}

.device-entry .remove-device-btn {
    background: rgba(255,107,107,0.15);
    color: #ff6b6b;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-entry .remove-device-btn:hover {
    background: #ff6b6b;
    color: #1a140c;
}

.add-device-btn {
    padding: 10px 16px;
    background: rgba(245,179,66,0.15);
    color: var(--gold);
    border: 1px dashed var(--gold);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
    width: 100%;
}

.add-device-btn:hover {
    background: rgba(245,179,66,0.25);
    border-color: var(--gold-light);
}

.add-customer-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.add-customer-form input {
    width: 100%;
}

.edit-customer-form input[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== MOBILE OPTIMIERUNG ===== */
@media (max-width: 600px) {
    .modal-content {
        padding: 25px 15px;
        max-width: 95%;
    }
    .modal-content input {
        font-size: 18px !important;
        padding: 18px !important;
        margin-bottom: 18px;
    }
    .modal-content .btn {
        padding: 18px !important;
        font-size: 18px !important;
        min-height: 55px;
    }
    .modal-content .close {
        font-size: 32px;
        padding: 10px;
    }
    #loginError {
        font-size: 16px;
    }
    section {
        padding: 80px 5%;
    }
    .hero {
        padding: 130px 5% 80px;
    }
    .hero h1 {
        font-size: 55px;
        letter-spacing: -3px;
    }
    .hero-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .feature-grid,
    .pricing-grid,
    .app-grid,
    .form-row,
    .review-grid {
        grid-template-columns: 1fr;
    }
    .price-card.featured {
        transform: none;
    }
    .test-box {
        padding: 35px 25px;
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .btn {
        text-align: center;
    }
    .reviews-carousel-container {
        gap: 10px;
    }
    .review-card {
        flex: 0 0 280px;
        padding: 20px;
    }
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    .device-entry {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 6px;
    }
    .device-entry .remove-device-btn {
        width: 100%;
        height: 40px;
    }
    .customer-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .customer-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* ===== COPY-BUTTON AUF MOBILEM OPTIMIERT ===== */
    .device-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 15px;
    }
    .device-item .device-m3u-wrapper {
        flex-wrap: wrap;
        gap: 8px;
    }
    .device-item .device-m3u {
        white-space: normal;
        word-break: break-all;
        font-size: 13px;
        line-height: 1.4;
        min-width: 100%;
    }
    .device-item .copy-btn {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 16px;
        min-height: 50px;
        border-radius: 8px;
        background: var(--gold);
        color: #1a140c;
        border: none;
        font-weight: 700;
    }
    .device-item .copy-btn:hover {
        background: var(--gold-light);
    }
    .device-item .device-mac {
        font-size: 16px;
        margin-bottom: 4px;
    }
}

/* ===== MOBILE MENU FIX ===== */
@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }
    nav {
        display: none;
    }
    nav.open {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 75px;
        right: 5%;
        padding: 20px;
        background: #14100a;
        border: 1px solid rgba(255,215,120,0.15);
        border-radius: 10px;
        gap: 15px;
        min-width: 200px;
        z-index: 1001;
        box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    }
}

/* ===== TOUCH-VERBESSERUNGEN ===== */
button, .btn, .nav-button, .submit-button, .logout-btn, .add-device-btn {
    touch-action: manipulation;
    cursor: pointer;
}
input, select, textarea {
    font-size: 16px;
}