/* --- IMPORT GOOGLE FONT (ROBOTO) --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap');

/* GLOBAL RESET */
* { box-sizing: border-box; transition: all 0.3s ease; }
body {
    background: #0f172a; /* Navy Dark */
    color: white;
    font-family: 'Segoe UI', sans-serif; /* Default site font */
    margin: 0;
    overflow-x: hidden;
}

/* --- IMAGE SAFETY NET --- */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- DASHBOARD HEADER --- */
.dashboard-header {
    background: rgba(15, 23, 42, 0.95);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.brand { font-size: 1.2em; font-weight: bold; color: white; display: flex; align-items: center; gap: 10px; }
.user-controls { display: flex; gap: 20px; align-items: center; font-size: 0.9em; }
.logout-link { color: #ef4444; text-decoration: none; font-weight: 500; }
.logout-link:hover { text-decoration: underline; }

/* --- LANDING PAGE LAYOUT --- */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    gap: 80px;
}

/* --- FLIP CARD --- */
.flip-card {
    background-color: transparent;
    width: 320px;
    height: 480px;
    perspective: 1000px;
    cursor: pointer;
}
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden; border-radius: 20px; padding: 30px;
    background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.flip-card-back { background: #1e293b; transform: rotateY(180deg); }

/* --- PROFILE IMAGE SIZING --- */
.profile-img { 
    width: 140px !important; height: 140px !important; 
    border-radius: 50%; object-fit: cover; 
    border: 3px solid #38bdf8; margin-bottom: 20px; 
}
.logo-img { width: 120px !important; margin-bottom: 20px; }

/* --- FORMS & BUTTONS --- */
.interaction-section { display: flex; flex-direction: column; gap: 20px; }
.glass-panel {
    background: rgba(255, 255, 255, 0.05); padding: 30px;
    border-radius: 15px; width: 350px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
h3 { margin-top: 0; color: #f8fafc; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
input, textarea {
    width: 100%; padding: 12px; margin: 8px 0;
    background: rgba(0,0,0,0.4); border: 1px solid #334155;
    color: white; border-radius: 6px;
}
/* Generic Button Style (for Login/Register/Send) */
button:not(.google-btn) {
    width: 100%; padding: 12px; margin-top: 15px;
    background: #3b82f6; color: white; border: none;
    border-radius: 6px; font-weight: bold; cursor: pointer;
}
button:not(.google-btn):hover { background: #2563eb; }

/* --- OFFICIAL GOOGLE BUTTON STYLE (EXACT MATCH) --- */
.google-btn {
    background-color: white !important;
    color: #3c4043 !important; /* Official Google Dark Gray text */
    border: 1px solid #dadce0 !important; /* Official subtle border */
    border-radius: 4px !important; /* Slightly squarer corners */
    padding: 0 12px !important;
    height: 40px; /* Fixed height for consistency */
    width: 100%;
    margin-top: 15px;
    cursor: pointer;
    
    /* Flex layout for centering icon and text */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Official Google Font specs */
    font-family: 'Roboto', arial, sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.25px;
    
    transition: background-color .2s, box-shadow .2s, border .2s;
    box-shadow: none;
}

.google-btn:hover {
    background-color: #f8f9fa !important; /* Slight grey hover */
    border-color: #dadce0 !important;
    box-shadow: 0 1px 2px rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15) !important; /* Official hover shadow */
    color: #202124 !important;
}

/* Style specifically for the Google SVG logo inside the button */
.google-btn img {
    width: 18px !important;
    height: 18px !important;
    margin-right: 24px; /* Proper spacing between logo and text */
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}
/* Ensure text is centered */
.google-btn span {
    text-align: center;
    flex-grow: 1; /* Pushes text to center accounting for icon width */
}

/* --- DASHBOARD TABS --- */
.dashboard-container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }
.nav-pills {
    display: flex; gap: 15px; margin-bottom: 40px; justify-content: center;
    background: rgba(0,0,0,0.2); padding: 10px; border-radius: 50px; width: fit-content; margin-left: auto; margin-right: auto;
}
.nav-item {
    padding: 10px 25px; border-radius: 30px; cursor: pointer;
    font-weight: 500; color: #94a3b8; transition: 0.3s; display: flex; align-items: center; gap: 8px;
}
.nav-item:hover { color: white; background: rgba(255,255,255,0.05); }
.nav-item.active { background: #38bdf8; color: #0f172a; font-weight: bold; box-shadow: 0 0 15px rgba(56, 189, 248, 0.4); }

/* --- TAB CONTENT & PRODUCT GRID --- */
.tab-content { display: none; animation: fadeIn 0.5s; }
.tab-content.active { display: block; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.product-card { 
    background: rgba(255,255,255,0.05); border-radius: 12px; overflow: hidden; 
    border: 1px solid rgba(255,255,255,0.05); text-align: left;
    transition: transform 0.3s;
}
.product-card:hover { transform: translateY(-5px); border-color: #38bdf8; }
.product-img { width: 100%; height: 220px; object-fit: cover; background: #1e293b; }
.btn-view { background: #38bdf8; color: #0f172a; width: 100%; margin-top: 10px; }

/* --- UTILITY --- */
.section-title h3 { border-bottom: none; font-size: 1.5em; margin-bottom: 5px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }