/* ====== Reset & Base Styles ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f8f9fa;
    color: #1f2937;
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* ====== Headings ====== */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0b3fc3;
    text-align: center;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    font-size: 1.5rem;
    color: #0b3fc3;
    margin-bottom: 15px;
}

/* ====== Main Content Layout ====== */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
}

/* ====== Input Section ====== */
.input-section,
.conversion-section,
.output-section {
    flex: 1 1 100%;
    min-width: 300px;
}

textarea {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    resize: vertical;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #0b3fc3;
    box-shadow: 0 0 8px rgba(11,63,195,0.3);
}

/* ====== Buttons ====== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #0b3fc3;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(11,63,195,0.2);
}

.btn:hover {
    background-color: #0940a1;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11,63,195,0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(11,63,195,0.2);
}

.copied {
    background-color: #16a34a !important;
    box-shadow: 0 4px 12px rgba(22,163,74,0.3);
}

/* ====== Action Buttons ====== */
.action-buttons-top {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* ====== Conversion Buttons Grid ====== */
.case-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* ====== Output Section ====== */
.output-section {
    margin-top: 20px;
}

.copy-btn {
    margin-top: 10px;
}

/* ====== Back to Top Button ====== */
#backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    padding: 12px 16px;
    font-size: 0.95rem;
    background: #0b3fc3;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(11,63,195,0.3);
    transition: all 0.3s ease;
    display: none;
    z-index: 999;
}

#backToTop:hover {
    background: #0940a1;
    transform: translateY(-2px);
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .btn {
        width: 100%;
    }
}
