@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-image: url('https://e-from.site/back.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    animation: bgZoom 30s ease-in-out infinite alternate;
}

/* Hilangkan overlay putih sebelumnya (Dihapus bagian body::before) */

/* Background zoom animasi */
@keyframes bgZoom {
    0% { background-size: 100% 100%; }
    100% { background-size: 105% 105%; }
}

/* Animasi Fade In */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.fade-in.delay-1 { animation-delay: 0.3s; }
.fade-in.delay-2 { animation-delay: 0.6s; }
.fade-in.delay-3 { animation-delay: 0.9s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    background: transparent;
    padding: 60px 20px 30px;
    text-align: center;
    color: #ffffff;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1.2px;
}

.hero p {
    font-size: 20px;
    opacity: 0.95;
    font-weight: 500;
}

/* Main Content */
.main-section {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.form-card {
    background: rgba(255, 255, 255, 0.2);
    padding: 35px 40px;
    border-radius: 24px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: box-shadow 0.3s ease;
}

.form-card:hover {
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.3);
}

.form-card h2 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* Inputs */
input[type="url"], input[type="text"] {
    width: 100%;
    padding: 16px;
    margin-bottom: 18px;
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="url"]:focus, input[type="text"]:focus {
    border-color: #0056b3;
    outline: none;
    box-shadow: 0 0 8px 2px rgba(0, 86, 179, 0.5);
}

/* Button */
button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0056b3, #007bff);
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 16px;
    letter-spacing: 0.7px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.6);
    transition: background 0.35s ease, transform 0.2s ease, box-shadow 0.35s ease;
    text-shadow: 0 0 5px rgba(255,255,255,0.85);
    position: relative;
    overflow: hidden;
}

button::before {
    content: "";
    position: absolute;
    top: 0; left: -75%;
    width: 50%;
    height: 100%;
    background: rgba(255,255,255,0.25);
    transform: skewX(-25deg);
    transition: left 0.5s ease;
    z-index: 1;
}

button:hover::before {
    left: 125%;
}

button:hover {
    background: linear-gradient(135deg, #007bff, #0056b3);
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.8);
}

/* Result Shortlink Box */
.shortlink-box {
    margin-top: 30px;
    padding: 25px;
    background: rgba(240, 250, 255, 0.85);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 123, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 123, 255, 0.3);
}

.shortlink-box input {
    margin-top: 15px;
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 86, 179, 0.6);
    background: rgba(255,255,255,0.95);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.shortlink-box button {
    margin-top: 15px;
    width: 100%;
    background: linear-gradient(135deg, #28a745, #218838);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.6);
    text-shadow: 0 0 5px rgba(255,255,255,0.85);
}

.shortlink-box button:hover {
    background: linear-gradient(135deg, #218838, #19692c);
    box-shadow: 0 6px 20px rgba(25, 105, 44, 0.8);
}

/* Error Message */
.error-msg {
    margin-top: 25px;
    background: rgba(255, 225, 225, 0.85);
    padding: 18px;
    border-left: 6px solid #dc3545;
    border-radius: 14px;
    color: #721c24;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
}

/* Footer */
footer {
    text-align: center;
    padding: 28px;
    font-size: 15px;
    color: #eee;
    margin-top: 40px;
    background: transparent;
    text-shadow: 0 0 4px rgba(0,0,0,0.3);
}

/* Responsive */
@media (max-width: 600px) {
    .form-card {
        padding: 25px 20px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }
}

/* Gunakan scroll untuk background di HP agar tidak rusak */
@media (max-width: 767px) {
    body {
        background-attachment: scroll !important;
    }
}
