/* ===================================
   COMMON STYLES FOR ALL TOOL PAGES
   =================================== */

.container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 550px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.back-link {
    display: block;
    text-align: left;
    margin-bottom: 20px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--primary);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

p.desc {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- Generic Input Styles --- */
.inputs-container {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.input-group {
    width: 100%; /* Default to full width, can be overridden if needed */
    display: flex;
    flex-direction: column;
}

.input-group label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
    padding-left: 4px;
}

.tool-input {
    width: 100%;
    height: 64px;
    border: 2px solid #cbd5e1;
    border-radius: 16px;
    font-size: 24px;
    text-align: center;
    font-weight: 700;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    outline: none;
}

.tool-input:focus {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

textarea.tool-input {
    height: auto;
    padding: 16px;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* --- Button Group Styles --- */
.btn-group {
    display: flex;
    gap: 12px;
}

.btn-calc {
    flex: 2;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(14, 165, 233, 0.2);
}

.btn-calc:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-calc:active {
    transform: scale(0.98);
}

.btn-clear {
    flex: 1;
    padding: 18px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear:hover {
    background: #e2e8f0;
    color: #334155;
    transform: translateY(-1px);
}

.btn-clear:active {
    transform: scale(0.98);
}

/* --- Common Result Section --- */
.result-section {
    margin-top: 30px;
    border-top: 2px dashed #e2e8f0;
    padding: 25px 0 0 0;
    text-align: center;
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Media Queries --- */
@media (max-width: 480px) {
    .container {
        padding: 25px;
    }
    .inputs-container {
        flex-direction: column;
        gap: 15px;
    }
    .input-group {
        width: 100%;
    }
    .tool-input {
        height: 55px;
        font-size: 22px;
    }
}

.qr-code-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}
