/* ==========================================================================
   Mobile Responsive Layout Optimization for IONOS Bot Landing Page
   - Top-Part Hero/Header Buttons: Prominent 1-Top + 2-Bottom Symmetrical Layout
   - Command Grid: Compact 2-Column Grid Layout for touch devices
   - Touch targets: Minimum 44px height with appropriate gaps and padding
   - Color values 100% unchanged!
   ========================================================================== */

/* Desktop & General Alignment for Header Auth Buttons */
#authActions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

#authActions .btn {
    margin-left: 0 !important;
    min-height: 40px;
    padding: 10px 18px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    body {
        padding: 16px 12px;
    }

    .container {
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
    }

    h1 {
        font-size: 1.75em;
        margin-bottom: 6px;
    }

    p.subtitle {
        font-size: 0.9em;
        margin-bottom: 20px;
    }

    /* Hero / Top-Part Header Banner */
    .login-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
        gap: 12px;
        margin-bottom: 20px;
    }

    .user-profile {
        justify-content: space-between;
        width: 100%;
        gap: 10px;
    }

    .user-coins-badge {
        margin-left: 0;
        min-height: 36px;
        padding: 4px 10px;
        font-size: 0.85em;
    }

    /* Top-Part Header Buttons: Prominent 1-Top + 2-Bottom Symmetrical Grid */
    #authActions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
    }

    /* Erster Button (z. B. "🔴 View Live") wird prominent oben vollflächig platziert */
    #authActions .btn:first-child {
        grid-column: span 2;
        width: 100%;
    }

    #authActions .btn {
        width: 100%;
        min-height: 44px;
        margin-left: 0 !important;
        padding: 8px 12px;
        font-size: 0.88em;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
    }

    #authActions .btn:only-child {
        grid-column: span 2;
    }

    #authActions .btn:last-child:nth-child(odd):not(:first-child) {
        grid-column: span 2;
    }

    /* StreamDeck Banner */
    .streamdeck-banner {
        margin-bottom: 16px;
    }

    .streamdeck-header {
        padding: 10px 14px;
        min-height: 44px;
        box-sizing: border-box;
        align-items: center;
    }

    .streamdeck-body {
        padding: 14px;
        gap: 12px;
    }

    .token-box {
        flex-wrap: wrap;
        gap: 8px;
    }

    .token-box button,
    .token-box .token-btn {
        min-height: 40px;
        padding: 6px 12px;
    }

    /* Search Bar */
    .search-container {
        margin-bottom: 12px;
    }

    .search-input {
        padding: 10px 16px;
        font-size: 0.95em;
        min-height: 44px;
    }

    .search-hint {
        margin-top: -8px;
        margin-bottom: 24px;
        font-size: 0.8em;
    }

    /* Section Titles */
    h2 {
        font-size: 1.35em;
        margin-top: 30px;
        padding-bottom: 8px;
    }

    /* Command Cards: Compact 2-Column Grid Layout */
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 14px;
    }

    .card {
        padding: 10px 12px;
        min-height: 52px;
        box-sizing: border-box;
        justify-content: center;
    }

    .card .cmd {
        font-size: 0.95em;
        margin-bottom: 2px;
        word-break: break-word;
    }

    .card .file {
        font-size: 0.78em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card .type-badge {
        top: 4px;
        right: 4px;
        font-size: 0.62em;
        padding: 1px 5px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px 8px;
    }

    h1 {
        font-size: 1.4em;
    }

    p.subtitle {
        font-size: 0.82em;
        margin-bottom: 16px;
    }

    .login-banner {
        padding: 12px;
        gap: 10px;
        margin-bottom: 16px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }

    .user-name {
        font-size: 0.95em;
    }

    .user-status {
        font-size: 0.78em;
    }

    #authActions {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    #authActions .btn {
        min-height: 44px;
        padding: 6px 8px;
        font-size: 0.82em;
        gap: 6px;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 10px;
    }

    .card {
        padding: 8px 10px;
        min-height: 48px;
    }

    .card .cmd {
        font-size: 0.88em;
        margin-bottom: 1px;
    }

    .card .file {
        font-size: 0.72em;
    }

    .search-input {
        min-height: 44px;
        padding: 8px 14px;
        font-size: 0.9em;
    }
}

@media (max-width: 768px) {
    body {
        padding: 16px 12px;
    }

    .container {
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
    }

    h1 {
        font-size: 1.75em;
        margin-bottom: 6px;
    }

    p.subtitle {
        font-size: 0.9em;
        margin-bottom: 20px;
    }

    /* Hero / Top-Part Header Banner */
    .login-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
        gap: 12px;
        margin-bottom: 20px;
    }

    .user-profile {
        justify-content: space-between;
        width: 100%;
        gap: 10px;
    }

    .user-coins-badge {
        margin-left: 0;
        min-height: 36px;
        padding: 4px 10px;
        font-size: 0.85em;
    }

    /* Top-Part Header Buttons: Prominent 1-Top + 2-Bottom Symmetrical Grid */
    #authActions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
    }

    /* Erster Button (z. B. "🔴 View Live") wird prominent oben vollflächig platziert */
    #authActions .btn:first-child {
        grid-column: span 2;
        width: 100%;
    }

    #authActions .btn {
        width: 100%;
        min-height: 44px;
        margin-left: 0 !important;
        padding: 8px 12px;
        font-size: 0.88em;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
    }

    #authActions .btn:only-child {
        grid-column: span 2;
    }

    #authActions .btn:last-child:nth-child(odd):not(:first-child) {
        grid-column: span 2;
    }

    /* StreamDeck Banner */
    .streamdeck-banner {
        margin-bottom: 16px;
    }

    .streamdeck-header {
        padding: 10px 14px;
        min-height: 44px;
        box-sizing: border-box;
        align-items: center;
    }

    .streamdeck-body {
        padding: 14px;
        gap: 12px;
    }

    .token-box {
        flex-wrap: wrap;
        gap: 8px;
    }

    .token-box button,
    .token-box .token-btn {
        min-height: 40px;
        padding: 6px 12px;
    }

    /* Search Bar */
    .search-container {
        margin-bottom: 12px;
    }

    .search-input {
        padding: 10px 16px;
        font-size: 0.95em;
        min-height: 44px;
    }

    .search-hint {
        margin-top: -8px;
        margin-bottom: 24px;
        font-size: 0.8em;
    }

    /* Section Titles */
    h2 {
        font-size: 1.35em;
        margin-top: 30px;
        padding-bottom: 8px;
    }

    /* Command Cards: Compact 2-Column Grid Layout */
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 14px;
    }

    .card {
        padding: 10px 12px;
        min-height: 52px;
        box-sizing: border-box;
        justify-content: center;
    }

    .card .cmd {
        font-size: 0.95em;
        margin-bottom: 2px;
        word-break: break-word;
    }

    .card .file {
        font-size: 0.78em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card .type-badge {
        top: 4px;
        right: 4px;
        font-size: 0.62em;
        padding: 1px 5px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px 8px;
    }

    h1 {
        font-size: 1.4em;
    }

    p.subtitle {
        font-size: 0.82em;
        margin-bottom: 16px;
    }

    .login-banner {
        padding: 12px;
        gap: 10px;
        margin-bottom: 16px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }

    .user-name {
        font-size: 0.95em;
    }

    .user-status {
        font-size: 0.78em;
    }

    #authActions {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    #authActions .btn {
        min-height: 44px;
        padding: 6px 8px;
        font-size: 0.82em;
        gap: 6px;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 10px;
    }

    .card {
        padding: 8px 10px;
        min-height: 48px;
    }

    .card .cmd {
        font-size: 0.88em;
        margin-bottom: 1px;
    }

    .card .file {
        font-size: 0.72em;
    }

    .search-input {
        min-height: 44px;
        padding: 8px 14px;
        font-size: 0.9em;
    }
}
