/* ==========================================================
   MOBILE ROOT THEME (Optimized for ≤768px)
   ========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    padding: 0 4vw;
}

/* Main Container */
.rm-container {
    width: 100%;
    margin: 1.5rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cards */
.rm-card {
    background: linear-gradient(145deg, #1a1a1a, #1e1e1e);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    border: 1px solid #2a2a2a;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.rm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #F90618, #2E3192);
    transition: all 0.3s ease;
}

.rm-card:active {
    transform: scale(0.995) translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Typography */
.rm-title {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding-bottom: 0.8rem;
}

.rm-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #F90618, #2E3192);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.rm-subtitle {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: center;
}

.rm-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #b0b0b0;
    margin-bottom: 1.2rem;
    text-align: left;
    word-wrap: break-word;
    hyphens: auto;
}

/* Button Group */
.rm-button-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

/* Buttons */
.rm-button {
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
    font-weight: 600;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Feedback Button */
.rm-feedback-btn {
    background: linear-gradient(135deg, #2E3192, #25287a);
}

.rm-feedback-btn:active {
    background: linear-gradient(135deg, #25287a, #1e2166);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 49, 146, 0.4);
}

/* Open Page Button */
.rm-openpage-btn {
    background: linear-gradient(135deg, #F90618, #d40514);
    text-decoration: none;
}

.rm-openpage-btn:hover {
  background: linear-gradient(135deg, #d40514, #b80412);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(249, 6, 24, 0.45);
  text-decoration: none;
}

/* ==========================================================
   FEEDBACK BUTTON ICON (Responsive + Integrated)
   ========================================================== */
.new-feedback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 1.5vw, 8px);
}

.feedback-icon {
    width: clamp(14px, 4vw, 18px);
    height: clamp(14px, 4vw, 18px);
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    transition: transform 0.25s ease, width 0.3s ease, height 0.3s ease;
}

.new-feedback-btn:hover .feedback-icon {
    transform: scale(1.08);
}

/* ==========================================================
   RESPONSIVE OPTIMIZATIONS
   ========================================================== */

@media (max-width: 480px) {
    body {
        padding: 0 3vw;
    }

    .rm-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .rm-title {
        font-size: 1.3rem;
    }

    .rm-subtitle {
        font-size: 1.1rem;
    }

    .rm-text {
        font-size: 0.9rem;
    }

    .feedback-icon {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 360px) {
    .feedback-icon {
        width: 13px;
        height: 13px;
    }
}

/* Landscape Mode (≤768px) */
@media (max-width: 768px) and (orientation: landscape) {
    .rm-button-group {
        flex-direction: row;
        justify-content: center;
        gap: 0.8rem;
    }

    .rm-button {
        width: auto;
        min-width: 140px;
        max-width: 200px;
        padding: 0.8rem 1rem;
    }
}

/* ==========================================================
   ACCESSIBILITY & PERFORMANCE
   ========================================================== */
.rm-button:focus {
    outline: 2px solid #2E3192;
    outline-offset: 2px;
}

.rm-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@supports(padding: max(0px)) {
    .rm-container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
}
