/* ========================================
   Mosaraf Hossain Grievance System
   Frontend Styles - Mobile First
   TMC Color Scheme: Green & Red
   ======================================== */

/* CSS Variables */
:root {
    --tmc-green: #006633;
    --tmc-green-light: #008844;
    --tmc-green-dark: #004d26;
    --tmc-red: #e31e24;
    --tmc-red-light: #ff3333;
    --tmc-red-dark: #b8151a;
    --white: #ffffff;
    --cream: #f8f4e8;
    --gold: #ffd700;
    --shadow: rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Bengali', 'ArekBangla', sans-serif;
    background: linear-gradient(180deg, var(--tmc-green-dark) 0%, var(--tmc-green) 30%, var(--tmc-green-light) 100%);
    min-height: 100vh;
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Fire Switch Button */
.fire-switch {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: linear-gradient(135deg, var(--tmc-red) 0%, var(--tmc-red-dark) 100%);
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.4);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.fire-switch:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 20px rgba(227, 30, 36, 0.6);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Container */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 15px;
    min-height: 100vh;
    position: relative;
}

/* Logo Section */
.logo-section {
    text-align: center;
 
}

.logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    /* background-color: #ffffff !important; */
    /* border-radius: 50%; */
    /* box-shadow: 0 8px 30px rgba(0,0,0,0.4); */
    overflow: hidden;
    position: relative;
}

.logo-img {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    z-index: 2;
    position: relative;
    /* background-color: #ffffff; */
}

/* Logo Fallback */
.logo-fallback {
    background: transparent;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
}

.logo-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-text .flower {
    font-size: 30px;
    display: block;
    margin-bottom: 3px;
}

.logo-text .main-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.logo-text .line1,
.logo-text .line2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--tmc-red);
    line-height: 1.1;
}

.logo-text .line3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--tmc-green);
    letter-spacing: 1px;
}

/* Video Section */
.video-section {
    margin: 20px 0;
}

.video-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border: 3px solid rgba(255,255,255,0.2);
}

.video-container video {
    width: 100%;
    max-width: 420px;
    height: 350px;
    display: block;
    object-fit: cover;
}

.video-placeholder {
    height: 350px;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    color: var(--white);
}

.placeholder-content .play-icon {
    font-size: 60px;
    opacity: 0.5;
}

.placeholder-content p {
    margin-top: 10px;
    font-size: 16px;
    opacity: 0.7;
}

/* Mute Button */
.mute-btn {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.mute-btn:hover {
    background: rgba(0,0,0,0.9);
}

.mute-btn.active {
    background: var(--tmc-red);
}

/* Hero Text */
.hero-text {
    text-align: center;
    padding: 20px 10px;
}

.hero-text .title {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hero-text .subtitle {
    font-size: 16px;
    font-weight: 400;
    color: rgba(255,255,255,0.95);
    line-height: 1.5;
}

.hero-text .highlight-name {
    font-size: 27px;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
    line-height: 1.3;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding: 20px 10px;
}

.action-buttons .btn {
    flex: 1;
    padding: 16px 12px;
    font-size: 16px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 25px;
    border: none;
    border-radius: 50px;
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-suggestion {
    background: linear-gradient(135deg, #ff6b35 0%, var(--tmc-red) 100%);
    color: var(--white);
    box-shadow: 0 8px 25px rgba(227, 30, 36, 0.4);
}

.btn-suggestion:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(227, 30, 36, 0.5);
}

.btn-problem {
    background: linear-gradient(135deg, #ffcc00 0%, #ff9500 100%);
    color: #333;
    box-shadow: 0 8px 25px rgba(255, 150, 0, 0.4);
}

.btn-problem:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 150, 0, 0.5);
}

.btn-icon {
    font-size: 22px;
}

.btn-text {
    flex: 1;
    text-align: center;
}

.btn-arrow {
    font-size: 20px;
    transition: var(--transition);
}

.btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* Form Section */
.form-section {
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.back-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: var(--white);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.back-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-3px);
}

.form-header h2 {
    font-size: 22px;
    font-weight: 600;
    flex: 1;
    line-height: 1.4;
}

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

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.95);
}

.form-group label .required {
    color: var(--tmc-red);
    margin-left: 3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255,255,255,0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.5);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.form-group select option {
    background: var(--tmc-green-dark);
    color: var(--white);
}

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

/* Input Toggle */
.input-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.toggle-btn {
    flex: 1;
    padding: 14px 15px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-btn:hover {
    background: rgba(255,255,255,0.2);
}

.toggle-btn.active {
    background: linear-gradient(135deg, var(--tmc-red) 0%, var(--tmc-red-dark) 100%);
    border-color: var(--tmc-red);
}

/* Voice Recording */
.voice-recording {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 15px;
}

.recorder-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.record-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--tmc-red) 0%, var(--tmc-red-dark) 100%);
    color: var(--white);
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(227, 30, 36, 0.4);
}

.record-btn:hover {
    transform: scale(1.05);
}

.record-btn.recording {
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 5px 20px rgba(227, 30, 36, 0.4); }
    50% { box-shadow: 0 5px 30px rgba(227, 30, 36, 0.8); }
}

.record-icon {
    font-size: 20px;
}

.recording-status {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    background: rgba(227, 30, 36, 0.2);
    border-radius: 30px;
}

.recording-dot {
    width: 12px;
    height: 12px;
    background: var(--tmc-red);
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.recording-time {
    font-family: monospace;
    font-size: 18px;
    font-weight: 600;
}

.stop-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    background: #333;
    color: var(--white);
    cursor: pointer;
    font-size: 14px;
}

.audio-player audio {
    width: 100%;
    border-radius: 30px;
}

.rerecord-btn {
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 25px;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    font-family: 'Noto Sans Bengali', sans-serif;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--tmc-red) 0%, var(--tmc-red-dark) 100%);
    color: var(--white);
    font-family: 'Noto Sans Bengali', sans-serif;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(227, 30, 36, 0.4);
    margin-top: 10px;
}

.submit-btn:disabled {
    background: rgba(255,255,255,0.2);
    cursor: not-allowed;
    box-shadow: none;
}

.submit-btn:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(227, 30, 36, 0.5);
}

/* Success Message */
.success-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-content {
    text-align: center;
    padding: 40px;
    max-width: 350px;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50 0%, #2e7d32 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 25px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-content h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.success-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.6;
}

.btn-primary {
    background: linear-gradient(135deg, var(--tmc-red) 0%, var(--tmc-red-dark) 100%);
    color: var(--white);
    padding: 15px 40px;
    font-size: 16px;
    border-radius: 50px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer p {
    font-size: 14px;
    opacity: 0.7;
}

.footer .tmc-slogan {
    font-size: 18px;
    font-weight: 600;
    color: var(--gold);
    margin-top: 10px;
    opacity: 1;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    margin-top: 20px;
    font-size: 16px;
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 400px) {
    .container {
        padding: 15px 12px;
    }
    
    .hero-text .name {
        font-size: 30px;
    }
    
    .hero-text .subtitle {
        font-size: 15px;
    }
    
    .btn {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .logo-text .line1,
    .logo-text .line2 {
        font-size: 26px;
    }
    
    .logo-text .line3 {
        font-size: 18px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 600px;
    }
    
    .hero-text .name {
        font-size: 42px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.4s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}