@import url('banner.css');

:root {
    --bg-color: #0f172a;
    /* Deep Midnight Blue */
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent-gold: #fbbf24;
    --accent-blue: #38bdf8;
    --danger: #f43f5e;
    --success: #34d399;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin-top: 50px;
    z-index: 10;
    position: relative;
    padding-bottom: 50px;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 1.5rem 2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    opacity: 0.7;
}

.admin-link:hover {
    color: var(--text-primary);
    opacity: 1;
}

/* Grid */
.recipients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.recipient-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.recipient-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.recipient-card.taken {
    opacity: 0.6;
    background: rgba(0, 0, 0, 0.2);
}

.recipient-card.taken-by-me {
    background: rgba(56, 189, 248, 0.15);
    /* Light blue tint */
    border: 1px solid var(--accent-blue);
    opacity: 1;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.recipient-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
}

.recipient-name {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Buttons */
button {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 100%;
}

.btn-take {
    background: linear-gradient(135deg, var(--accent-blue), #0ea5e9);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-take:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

.btn-untake {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-untake:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.btn-danger {
    background: var(--danger);
    color: white;
    margin-top: 10px;
}

.btn-edit {
    background: var(--accent-gold);
    color: #000;
    margin-top: 10px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-available {
    background: rgba(52, 211, 153, 0.2);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.status-taken {
    background: rgba(244, 63, 94, 0.2);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.status-mine {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-blue);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Admin Panel */
.admin-panel {
    max-width: 800px;
    margin: 0 auto;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
}

.admin-input {
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
    outline: none;
}

.admin-input:focus {
    border-color: var(--accent-blue);
}

.btn-add {
    width: auto;
    background: var(--success);
    color: white;
    align-self: flex-start;
}

.login-form {
    max-width: 400px;
    margin: 50px auto;
    text-align: center;
}

/* Snow Animation - FIXED */
.snowflake {
    color: #fff;
    font-size: 1em;
    font-family: Arial;
    text-shadow: 0 0 1px #000;
    position: fixed;
    top: -10%;
    z-index: 9999;
    user-select: none;
    cursor: default;
    animation-name: snowflakes-fall, snowflakes-shake;
    animation-duration: 10s, 3s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-play-state: running, running;
}

@keyframes snowflakes-fall {
    0% {
        top: -10%;
    }

    100% {
        top: 100%;
    }
}

@keyframes snowflakes-shake {
    0% {
        transform: translateX(0px);
    }

    50% {
        transform: translateX(80px);
    }

    100% {
        transform: translateX(0px);
    }
}

.snowflake:nth-of-type(0) {
    left: 1%;
    animation-delay: 0s, 0s
}

.snowflake:nth-of-type(1) {
    left: 10%;
    animation-delay: 1s, 1s
}

.snowflake:nth-of-type(2) {
    left: 20%;
    animation-delay: 6s, .5s
}

.snowflake:nth-of-type(3) {
    left: 30%;
    animation-delay: 4s, 2s
}

.snowflake:nth-of-type(4) {
    left: 40%;
    animation-delay: 2s, 2s
}

.snowflake:nth-of-type(5) {
    left: 50%;
    animation-delay: 8s, 3s
}

.snowflake:nth-of-type(6) {
    left: 60%;
    animation-delay: 6s, 2s
}

.snowflake:nth-of-type(7) {
    left: 70%;
    animation-delay: 2.5s, 1s
}

.snowflake:nth-of-type(8) {
    left: 80%;
    animation-delay: 1s, 0s
}

.snowflake:nth-of-type(9) {
    left: 90%;
    animation-delay: 3s, 1.5s
}

/* Messages */
#message-area {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 90%;
    max-width: 400px;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}