:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --accent-color: #8b5cf6;
    --success-color: #10b981;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background Blobs for Aesthetics */
.background-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    bottom: -50px;
    right: -50px;
    animation-delay: 2s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: var(--success-color);
    top: 40%;
    left: 40%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

/* App Container */
.app-container {
    width: 90%;
    max-width: 500px;
    z-index: 10;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    letter-spacing: -0.5px;
}

.logo img {
    height: 48px;
    width: 48px;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
    transition: transform 0.3s;
}

.logo:hover img {
    transform: scale(1.1) rotate(-5deg);
}

/* Glassmorphism Components */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.glass-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

/* Tab Switcher */
.tab-switcher {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 0.3rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.8rem;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s;
}

.tab-btn.active {
    border-radius: 16px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
    padding: 3rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.15);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.drop-zone i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.drop-zone:hover i {
    transform: translateY(-5px);
}

.timer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-variant-numeric: tabular-nums;
}

.timer-container.expired {
    color: #ef4444;
}

/* Receive Mode Styles */
.receive-container {
    text-align: center;
    padding: 1rem 0;
}

.big-input {
    font-size: 2rem;
    text-align: center;
    letter-spacing: 4px;
    padding: 1rem;
    margin: 1.5rem 0;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    color: white;
    width: 100%;
    transition: border-color 0.3s;
}

.big-input:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* Transfers List */
.transfers-list {
    margin-top: 1.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.transfer-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: width 0.2s;
}

.transfer-info {
    flex: 1;
    overflow: hidden;
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.file-name {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.transfer-details {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: space-between;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 0.4rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    width: 0%;
    transition: width 0.2s;
}

/* Utility */
.hidden {
    display: none !important;
}

.status-text {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 1rem;
}

.code-wrapper {
    text-align: center;
    margin-bottom: 1rem;
}

.big-code {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.icon-btn:hover {
    opacity: 1;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design */
@media (max-width: 600px) {
    .app-container {
        width: 95%;
        padding: 1rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .logo img {
        height: 32px;
        width: 32px;
    }

    .big-code {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .drop-zone {
        padding: 2rem 1rem;
    }

    .drop-zone i {
        font-size: 2.5rem;
    }
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.6;
    padding-bottom: 1rem;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-variant-numeric: tabular-nums;
}

.timer-container.expired {
    color: #ef4444;
}

/* Receive Mode Styles */
.receive-container {
    text-align: center;
    padding: 1rem 0;
}

.big-input {
    font-size: 2rem;
    text-align: center;
    letter-spacing: 4px;
    padding: 1rem;
    margin: 1.5rem 0;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    color: white;
    width: 100%;
    transition: border-color 0.3s;
}

.big-input:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* Transfers List */
.transfers-list {
    margin-top: 1.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.transfer-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: width 0.2s;
}

.transfer-info {
    flex: 1;
    overflow: hidden;
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.file-name {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.transfer-details {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: space-between;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 0.4rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    width: 0%;
    transition: width 0.4s linear;
}

/* Utility */
.hidden {
    display: none !important;
}

.status-text {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 1rem;
}

.code-wrapper {
    text-align: center;
    margin-bottom: 1rem;
}

.big-code {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.icon-btn:hover {
    opacity: 1;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design */
@media (max-width: 600px) {
    .app-container {
        width: 95%;
        padding: 1rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .logo img {
        height: 32px;
        width: 32px;
    }

    .big-code {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .drop-zone {
        padding: 2rem 1rem;
    }

    .drop-zone i {
        font-size: 2.5rem;
    }
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.6;
    padding-bottom: 1rem;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 1rem;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Header Controls */
.header-controls {
    display: flex;
    gap: 0.5rem;
}

/* History Panel */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.history-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.history-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.history-meta {
    font-size: 0.75rem;
    opacity: 0.7;
}
