/* /www/wwwroot/tdlstore.com/style.css */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --text-main: #1F2937;
    --text-muted: #e5e7eb;
}

* {
    box-sizing: border-box; /* Ensures padding doesn't break widths */
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=1920&auto=format&fit=crop') no-repeat center center fixed;
    background-size: cover;
}

/* Glassmorphism Effect */
.glass {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header & Animated Logo */
header {
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo { 
    font-size: 30px; 
    font-weight: 800; 
    text-decoration: none; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    display: inline-block;
}

.popup-text {
    display: inline-block;
    color: #fff;
    animation: popUpBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    transition: transform 0.3s ease, color 0.3s ease;
}

.logo:hover .popup-text {
    transform: scale(1.1);
    color: var(--primary);
}

@keyframes popUpBounce {
    0% { opacity: 0; transform: scale(0.3) translateY(20px); }
    60% { opacity: 1; transform: scale(1.15) translateY(-5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Hero Section */
.hero { text-align: center; padding: 60px 20px 40px; }
.hero h1 { font-size: 42px; font-weight: 700; margin-bottom: 15px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.hero p { font-size: 18px; color: var(--text-muted); max-width: 600px; margin: auto; line-height: 1.6; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }

/* Grid & Cards */
.main-content { flex: 1; }
.domain-container {
    max-width: 1200px; margin: 0 auto 60px; padding: 0 20px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px;
}
.domain-card {
    border-radius: 16px; padding: 30px; text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative; overflow: hidden;
}
.domain-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.5); border-color: var(--primary); }
.card-badge { position: absolute; top: 15px; right: 15px; background: rgba(16, 185, 129, 0.2); color: #10b981; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 20px; border: 1px solid #10b981; }
.d-name { font-size: 26px; font-weight: 700; margin: 15px 0 10px; word-break: break-all; }
.d-cat { font-size: 14px; color: #cbd5e1; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.d-price { font-size: 28px; font-weight: 700; color: #4ade80; margin-bottom: 25px; }

.btn-action { display: block; width: 100%; background: var(--primary); color: white; border: none; padding: 15px; font-size: 16px; font-weight: 600; border-radius: 10px; cursor: pointer; transition: 0.3s ease; }
.btn-action:hover { background: var(--primary-hover); transform: scale(1.03); }

/* --- Fully Responsive Modal / Form --- */
.modal { 
    display: none; position: fixed; z-index: 999; left: 0; top: 0; width: 100%; height: 100%; 
    background-color: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); 
    align-items: center; justify-content: center; padding: 15px; /* Adds safe area on mobile */
}

.modal-content { 
    background: #fff; color: var(--text-main); border-radius: 20px; padding: 40px; 
    width: 100%; max-width: 500px; position: relative; 
    animation: slideUp 0.4s ease forwards;
    /* Allows scrolling if screen height is too small */
    max-height: 90vh; 
    overflow-y: auto; 
}

.close-btn { position: absolute; top: 15px; right: 25px; font-size: 32px; color: #666; cursor: pointer; transition: 0.2s; line-height: 1; }
.close-btn:hover { color: #000; }

.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-control { width: 100%; padding: 12px 15px; border: 2px solid #e5e7eb; border-radius: 10px; font-family: 'Poppins', sans-serif; font-size: 15px; outline: none; transition: 0.3s; }
.form-control:focus { border-color: var(--primary); }
.form-control[readonly] { background: #f3f4f6; color: var(--primary); font-weight: 700; cursor: not-allowed; }

/* Toast Alert */
.toast { position: fixed; bottom: 30px; right: 30px; padding: 15px 25px; border-radius: 10px; font-weight: 600; box-shadow: 0 10px 20px rgba(0,0,0,0.3); z-index: 1000; display: flex; align-items: center; gap: 10px; animation: slideInRight 0.5s ease forwards, fadeOut 0.5s ease 4.5s forwards; color: #fff; }
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }

/* Footer */
footer { padding: 20px 0; text-align: center; font-size: 14px; color: #94a3b8; border-top: 1px solid rgba(255,255,255,0.1); margin-top: auto; }

/* Animations */
@keyframes slideUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }

/* ========================================= */
/* MOBILE & TABLET RESPONSIVENESS      */
/* ========================================= */
@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 15px; }
    .logo { font-size: 24px; }
    .domain-container { gap: 20px; }
}

@media (max-width: 480px) {
    .hero { padding: 40px 15px 30px; }
    .hero h1 { font-size: 26px; }
    
    /* Make Modal/Form touch-friendly & compact on small screens */
    .modal-content { 
        padding: 30px 20px 20px; /* Reduced side padding for more input space */
        border-radius: 15px;
    }
    .modal-content h2 { font-size: 20px; }
    .modal-content p { font-size: 13px !important; margin-bottom: 15px !important; }
    
    .form-group { margin-bottom: 15px; }
    .form-group label { font-size: 13px; margin-bottom: 5px; }
    .form-control { padding: 10px 12px; font-size: 14px; }
    
    .close-btn { top: 10px; right: 15px; font-size: 28px; }
    
    .btn-action { padding: 12px; font-size: 15px; }

    /* Adjust Toast for Mobile */
    .toast { left: 20px; right: 20px; bottom: 20px; width: auto; font-size: 14px; padding: 12px 20px; }
}

