/* ===== SMS Counter Bootstrap Styles ===== */

/* ===== CORE STYLES ===== */
:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

.sms-counter-container {
    background: linear-gradient(135deg, #667eea 0%, #a9c0d8 100%);
    min-height: 100vh;
    padding-top: 60px;
    padding-bottom: 40px;
}

/* ===== STAT BOX STYLES ===== */
.stat-box {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

/* ===== TEXTAREA STYLES ===== */
#userWord {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    resize: vertical;
    transition: border-color 0.3s;
}

#userWord:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* ===== BUTTON STYLES ===== */
.btn-success, .btn-danger, .btn-lg {
    font-weight: 600;
    border-radius: 8px;
    padding: 12px 30px;
    transition: all 0.3s;
}

.btn-success:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-danger:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* ===== TABLE STYLES ===== */
#myTable, #myTable2 {
    font-family: 'Anonymous Pro', 'Courier New', monospace;
    font-size: 12px;
    margin-top: 15px;
}

#myTable td, #myTable2 td {
    width: 30px;
    height: 30px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #007bff;
    background: linear-gradient(135deg, #e7f3ff 0%, #d1e7ff 100%);
    transition: all 0.2s;
    font-weight: 500;
    color: #0c3d7a;
}

#myTable2 td:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056cc 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
}

.skippedCells {
    background-color: #f0f0f0 !important;
    border: 1px dotted #999 !important;
    color: #666 !important;
}

/* ===== CARD STYLES ===== */
.card {
    border-radius: 12px;
    transition: all 0.3s;
    margin-bottom: 30px;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 12px 12px 0 0;
    font-weight: 600;
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

.card-header h5 {
    margin: 0;
    font-size: 16px;
}

/* ===== ALERT STYLES ===== */
.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* ===== SECTION STYLES ===== */
section {
    scroll-margin-top: 100px;
}

section h2, section h3 {
    font-weight: 700;
    margin-bottom: 20px;
}

section h2 {
    font-size: 2.5rem;
    color: #1a1a1a;
}

section h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
}

section ul li {
    padding: 8px 0;
    line-height: 1.8;
}

section .lead {
    font-size: 1.15rem;
    color: #666;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet & Medium Screens (992px and below) */
@media only screen and (max-width: 992px) {
    .sms-counter-container {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 40px 20px 30px;
    }

    .stat-value {
        font-size: 28px;
    }

    .stat-box {
        padding: 15px;
    }

    #userWord {
        font-size: 15px;
        min-height: 200px;
    }

    .card {
        margin-bottom: 20px;
    }

    section {
        padding: 40px 20px;
    }

    section h2 {
        font-size: 2rem;
    }

    section h3 {
        font-size: 1.5rem;
    }
}

/* Tablet & Small Devices (768px and below) */
@media only screen and (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .sms-counter-container {
        padding: 30px 15px 25px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    .card {
        margin-bottom: 15px;
    }

    .card-body {
        padding: 15px;
    }

    .stat-box {
        padding: 12px;
        margin-bottom: 10px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 24px;
    }

    #userWord {
        font-size: 14px;
        padding: 10px;
        min-height: 180px;
        rows: 5;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 14px;
    }

    #myTable td, #myTable2 td {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }

    section {
        padding: 30px 15px;
    }

    section h2 {
        font-size: 1.75rem;
        margin-bottom: 15px;
    }

    section h3 {
        font-size: 1.25rem;
        margin-top: 15px;
    }

    .card-header h5 {
        font-size: 15px;
    }

    section p {
        font-size: 13px;
    }

    section ul li {
        padding: 6px 0;
    }
}

/* Small Phones (550px and below) */
@media only screen and (max-width: 550px) {
    html {
        font-size: 12px;
    }

    .sms-counter-container {
        padding: 25px 10px 20px;
    }

    .text-center h1 {
        font-size: 1.5rem !important;
        margin-bottom: 10px !important;
    }

    .text-center .lead {
        font-size: 0.9rem;
    }

    .card {
        margin-bottom: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .stat-box {
        padding: 10px;
        margin-bottom: 8px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-value {
        font-size: 22px;
    }

    #userWord {
        font-size: 13px;
        padding: 8px;
        min-height: 150px;
    }

    .btn-lg {
        padding: 8px 15px;
        font-size: 12px;
    }

    .d-grid.gap-2 {
        gap: 5px !important;
    }

    #myTable td, #myTable2 td {
        width: 24px;
        height: 24px;
        font-size: 9px;
        padding: 2px;
    }

    section {
        padding: 20px 10px;
    }

    section h2 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    section h3 {
        font-size: 1.1rem;
        margin-top: 12px;
    }

    .card-header h5 {
        font-size: 13px;
    }

    section p, section ul li {
        font-size: 12px;
        padding: 4px 0;
    }

    .alert {
        padding: 10px 12px;
        font-size: 12px;
    }

    .alert h5 {
        font-size: 13px;
        margin-bottom: 8px;
    }
}

/* Extra Small Phones (480px and below) */
@media only screen and (max-width: 480px) {
    html {
        font-size: 11px;
    }

    .sms-counter-container {
        padding: 20px 8px 15px;
    }

    .text-center h1 {
        font-size: 1.3rem !important;
        margin-bottom: 8px !important;
    }

    .text-center .lead {
        font-size: 0.85rem;
    }

    .row {
        margin-right: -5px;
        margin-left: -5px;
    }

    .col-md-3, .col-sm-6 {
        padding-right: 5px;
        padding-left: 5px;
    }

    .stat-box {
        padding: 8px;
        margin-bottom: 6px;
        border-width: 1px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stat-value {
        font-size: 20px;
    }

    #userWord {
        font-size: 12px;
        padding: 6px;
        min-height: 120px;
        rows: 4;
    }

    .btn-lg {
        padding: 6px 12px;
        font-size: 11px;
    }

    .d-grid.gap-2.d-sm-flex {
        flex-direction: column;
    }

    .d-grid.gap-2 {
        gap: 3px !important;
    }

    #myTable td, #myTable2 td {
        width: 22px;
        height: 22px;
        font-size: 8px;
        padding: 1px;
    }

    section {
        padding: 15px 8px;
    }

    section h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    section h3 {
        font-size: 1rem;
        margin-top: 10px;
    }

    .card-header h5 {
        font-size: 12px;
    }

    section p, section ul li {
        font-size: 11px;
        padding: 3px 0;
    }

    .alert {
        padding: 8px 10px;
        font-size: 11px;
    }

    .alert h5 {
        font-size: 12px;
        margin-bottom: 6px;
    }
}

/* Very Small Screens (Below 380px) */
@media only screen and (max-width: 380px) {
    #myTable td, #myTable2 td {
        width: 20px;
        height: 20px;
        font-size: 7px;
    }

    .stat-value {
        font-size: 18px;
    }

    .btn-lg {
        padding: 5px 10px;
        font-size: 10px;
    }
}
