/* ============= ROOT VAR ============= */
:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --radius: 22px;
    --shadow: 0 6px 18px rgba(0,0,0,0.08);
    --primary: #007bff;
    --text: #222;
    --border: #dcdcdc;
}

/* ============= GLOBAL ============= */
body {
    background: var(--bg);
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 26px;
    color: var(--text);
    font-weight: 700;
}

/* ============= CARD CONTAINER ============= */
.container {
    width: 100%;
    background: var(--card);
    padding: 30px;
    margin: 20px auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: 0.2s;
}

/* ============= INPUT MODERN ============= */
input, textarea {
    width: 100%;
    padding: 14px 16px;
    margin: 12px 0 20px 0;
    border: 1.4px solid var(--border);
    border-radius: 14px;
    font-size: 17px;
    background: #fafafa;
    box-sizing: border-box;
    transition: 0.2s;
}

input:focus, textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.12);
    outline: none;
}

/* ============= BUTTON MODERN ============= */
.btn, .btn-primary {
    width: 100%;
    padding: 15px;
    border: none;
    font-size: 18px;
    border-radius: 14px;
    cursor: pointer;
    margin-bottom: 16px;
    font-weight: 600;
    transition: 0.2s;
}

.btn {
    background: #6c757d;
    color: white;
}

.btn:hover {
    background: #5b6369;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #006ee6;
}

/* ============= LOADING BUTTON ============= */
.btn-loading {
    opacity: 0.7;
    position: relative;
}

.btn-loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 3px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ============= PREVIEW FOTO ============= */
.image-preview {
    margin-top: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.image-preview p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

.image-preview img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============= RESPONSIVE ============= */

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        margin: 15px;
        padding: 25px;
        border-radius: 20px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 18px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 700px;
        padding: 40px;
    }
}

@media (min-width: 1025px) {
    .container {
        max-width: 500px;
        padding: 45px;
    }
}
