/* Root Variables & Theme Definition */
:root {
    --primary-blue: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    --accent-color: #ec4899;
    --dark-btn: #111827;
    --dark-btn-hover: #1f2937;
    
    --bg-gradient-1: #1e3a8a;
    --bg-gradient-2: #2563eb;
    --bg-gradient-3: #60a5fa;

    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);

    --text-main: #0f172a;
    --text-muted: #64748b;
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background Ambient Glows */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.6;
    animation: floatGlow 12s infinite alternate ease-in-out;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: #3b82f6;
    top: -100px;
    left: -100px;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: #a855f7;
    bottom: -150px;
    right: -100px;
    animation-delay: -4s;
}

.glow-3 {
    width: 350px;
    height: 350px;
    background: #38bdf8;
    top: 40%;
    left: 60%;
    animation-delay: -8s;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.15); }
}

/* App Main Container */
.app-container {
    width: 100%;
    max-width: 900px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Hero Glass Card (Matching uploaded screenshot style) */
.hero-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.brand-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.wave-emoji {
    font-size: 26px;
    display: inline-block;
    animation: wave 2s infinite transform-origin;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(14deg); }
    40% { transform: rotate(-8deg); }
    60% { transform: rotate(14deg); }
    80% { transform: rotate(-4deg); }
}

.brand-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

/* UP Status Pill Badge */
.status-badge {
    background: rgba(187, 247, 208, 0.7);
    border: 1px solid rgba(134, 239, 172, 0.9);
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}

.status-dot {
    width: 9px;
    height: 9px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
    animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.status-text {
    font-size: 12px;
    font-weight: 800;
    color: #15803d;
    letter-spacing: 0.5px;
}

/* Profile Section Inner Area */
.profile-section {
    background: rgba(255, 255, 255, 0.45);
    border: 1.5px dashed rgba(148, 163, 184, 0.35);
    border-radius: 20px;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: background 0.3s ease;
}

.profile-section:hover {
    background: rgba(255, 255, 255, 0.65);
}

.avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: block;
    margin-bottom: 12px;
}

.avatar-glow {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    filter: blur(6px);
    opacity: 0.7;
    transition: opacity 0.3s;
}

.avatar-wrapper:hover .avatar-glow {
    opacity: 1;
}

.avatar-img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.profile-link {
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: color 0.2s;
}

.profile-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Hero Action Buttons */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.btn-dark {
    background: var(--dark-btn);
    color: #ffffff;
}

.btn-dark:hover {
    background: var(--dark-btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.3);
}

.btn-accent {
    background: rgba(255, 255, 255, 0.9);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.2);
    margin-left: auto;
}

.btn-accent:hover {
    background: #ffffff;
    border-color: #2563eb;
    transform: translateY(-2px);
}

/* Padlet Main Board Area */
.padlet-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.padlet-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding-bottom: 20px;
}

.padlet-title-box h2 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.padlet-title-box h2 i {
    color: #2563eb;
}

.padlet-title-box p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(203, 213, 225, 0.6);
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: #ffffff;
    color: #1e293b;
}

.filter-chip.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

/* Padlet Cards Responsive Grid */
.padlet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    min-height: 200px;
}

/* Individual Padlet Card Styling */
.padlet-card {
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.padlet-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.09);
}

/* Color Theme Presets for Padlet Cards */
.color-glass { background: rgba(255, 255, 255, 0.85); }
.color-blue { background: rgba(224, 242, 254, 0.9); border-color: rgba(186, 230, 253, 0.9); }
.color-purple { background: rgba(243, 232, 255, 0.9); border-color: rgba(233, 213, 255, 0.9); }
.color-pink { background: rgba(252, 231, 243, 0.9); border-color: rgba(251, 207, 232, 0.9); }
.color-yellow { background: rgba(254, 249, 195, 0.9); border-color: rgba(254, 240, 138, 0.9); }
.color-mint { background: rgba(209, 250, 229, 0.9); border-color: rgba(167, 243, 208, 0.9); }

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: #334155;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.card-time {
    font-size: 11px;
    color: #64748b;
}

.card-body h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-body p {
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
    white-space: pre-line;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

.card-author {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 5px;
}

.like-btn {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s, background 0.2s;
}

.like-btn:hover {
    background: #ffffff;
    transform: scale(1.1);
}

.like-btn.liked i {
    animation: pop 0.3s ease;
}

@keyframes pop {
    50% { transform: scale(1.4); }
}

/* Modal Popup */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    padding: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #0f172a;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Color Swatch Selection */
.color-picker {
    display: flex;
    gap: 10px;
}

.color-option {
    cursor: pointer;
}

.color-option input {
    display: none;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: block;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
}

.color-option input:checked + .color-swatch {
    transform: scale(1.15);
    border-color: #2563eb;
}

.swatch-glass { background: #f1f5f9; border: 1px solid #cbd5e1; }
.swatch-blue { background: #bae6fd; }
.swatch-purple { background: #e9d5ff; }
.swatch-pink { background: #fbcfe8; }
.swatch-yellow { background: #fef08a; }
.swatch-mint { background: #a7f3d0; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Toast Notification Styling */
#toastContainer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
    body {
        padding: 16px 12px;
    }
    .hero-card, .padlet-section {
        padding: 20px 18px;
        border-radius: 20px;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        width: 100%;
    }
    .btn-accent {
        margin-left: 0;
    }
}
