/* style.css */
:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --bg-card: #1e1e1e;
    --red-primary: #00bfff;
    --red-hover: #ff5555;
    --white: #ffffff;
    --gray: #888888;
    --gray-light: #aaaaaa;
    --border-color: rgba(255, 59, 59, 0.2);
    --shadow-glow: rgba(255, 59, 59, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--white);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background-image: radial-gradient(circle at 20% 30%, rgba(255, 59, 59, 0.03) 0%, transparent 60%);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.navbar {
    background: rgba(26, 26, 26, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--red-primary);
}

.nav-brand i {
    font-size: 1.6rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-light);
    font-size: 0.95rem;
}

.nav-user i {
    font-size: 1.2rem;
    color: var(--red-primary);
}

.nav-link {
    color: var(--gray-light);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--white);
    background: rgba(255, 59, 59, 0.08);
}

.nav-link.active {
    color: var(--white);
    background: rgba(255, 59, 59, 0.12);
}

.nav-link-primary {
    background: var(--red-primary);
    color: var(--white);
}

.nav-link-primary:hover {
    background: var(--red-hover);
    color: var(--white);
}

.hero {
    text-align: center;
    padding: 50px 20px 30px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, transparent 100%);
    border-radius: 16px;
    margin-bottom: 30px;
}

.hero-icon {
    font-size: 3.5rem;
    color: var(--red-primary);
    margin-bottom: 15px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--gray);
}

.send-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.card:hover {
    border-color: rgba(255, 59, 59, 0.35);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-header i {
    font-size: 1.4rem;
    color: var(--red-primary);
}

.card-header h2 {
    font-size: 1.2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--gray-light);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group label i {
    color: var(--red-primary);
    margin-right: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 11px 15px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--white);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--red-primary);
    box-shadow: 0 0 20px var(--shadow-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray);
}

.hint {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--gray);
}

.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 5px;
}

.btn-submit {
    width: 100%;
    padding: 13px;
    background: var(--red-primary);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover:not(:disabled) {
    background: var(--red-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 59, 59, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-top: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(0, 255, 0, 0.08);
    border: 1px solid rgba(0, 255, 0, 0.2);
    color: #00ff00;
}

.alert-error {
    background: rgba(255, 59, 59, 0.08);
    border: 1px solid rgba(255, 59, 59, 0.2);
    color: var(--red-primary);
}

.info-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-content {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.info-content i {
    font-size: 2rem;
    color: var(--red-primary);
    margin-bottom: 10px;
}

.info-content h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.info-content p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
}

.share-box {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.share-box input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--white);
    font-size: 0.8rem;
    min-width: 0;
}

.btn-copy {
    padding: 8px 15px;
    background: var(--red-primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-copy:hover {
    background: var(--red-hover);
}

.inbox-header {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.inbox-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.inbox-header-content i {
    font-size: 2.5rem;
    color: var(--red-primary);
}

.inbox-header-content h1 {
    font-size: 1.8rem;
}

.inbox-header-content p {
    color: var(--gray);
}

.share-section {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-share {
    padding: 8px 18px;
    background: var(--bg-primary);
    color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-share:hover {
    border-color: var(--red-primary);
    background: rgba(255, 59, 59, 0.05);
}

.share-message {
    color: #00ff00;
    font-size: 0.9rem;
}

.inbox-container {
    margin-bottom: 30px;
}

.messages-grid {
    display: grid;
    gap: 15px;
}

.message-envelope {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    align-items: flex-start;
    transition: all 0.3s;
    position: relative;
}

.message-envelope:hover {
    border-color: rgba(255, 59, 59, 0.3);
    transform: translateX(5px);
}

.message-envelope.unread {
    border-left: 3px solid var(--red-primary);
    background: rgba(255, 59, 59, 0.03);
}

.message-envelope.read {
    border-left: 3px solid var(--gray);
    opacity: 0.85;
}

.envelope-icon {
    font-size: 1.8rem;
    color: var(--red-primary);
    position: relative;
    flex-shrink: 0;
    padding-top: 2px;
}

.unread-dot {
    position: absolute;
    top: -2px;
    right: -6px;
    width: 10px;
    height: 10px;
    background: var(--red-primary);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.envelope-content {
    flex: 1;
    min-width: 0;
}

.message-text {
    color: var(--white);
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
    margin-bottom: 10px;
}

.envelope-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray);
}

.envelope-footer i {
    margin-right: 4px;
}

.message-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.envelope-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-action {
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-action:hover {
    color: var(--white);
    background: rgba(255, 59, 59, 0.1);
}

.btn-action.delete:hover {
    color: var(--red-primary);
}

.loading-state,
.empty-state,
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.loading-state i,
.empty-state i,
.error-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--gray);
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--white);
}

.empty-state p {
    margin-bottom: 15px;
}

.share-promo-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px 30px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.share-promo-card i {
    font-size: 2rem;
    color: var(--red-primary);
}

.share-promo-card h3 {
    margin-bottom: 3px;
}

.share-promo-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

.share-link-box {
    flex: 1;
    display: flex;
    gap: 10px;
    min-width: 250px;
}

.share-link-box input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--white);
    font-size: 0.85rem;
    min-width: 0;
}

.btn-copy-link {
    padding: 10px 20px;
    background: var(--red-primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-copy-link:hover {
    background: var(--red-hover);
}

.cta-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px 30px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
}

.cta-card i {
    font-size: 2.5rem;
    color: var(--red-primary);
}

.cta-card h3 {
    margin-bottom: 5px;
}

.cta-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

.cta-card .btn-primary {
    margin-left: auto;
    padding: 10px 25px;
    background: var(--red-primary);
    color: var(--white);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.cta-card .btn-primary:hover {
    background: var(--red-hover);
    transform: translateY(-2px);
}

.auth-card {
    max-width: 420px;
    margin: 60px auto;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header i {
    font-size: 3rem;
    color: var(--red-primary);
    margin-bottom: 15px;
}

.auth-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.auth-header p {
    color: var(--gray);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--gray);
}

.auth-footer a {
    color: var(--red-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .send-wrapper {
        grid-template-columns: 1fr;
    }
    
    .inbox-header-content {
        flex-wrap: wrap;
    }
    
    .share-section {
        margin-left: 0;
        width: 100%;
    }
    
    .cta-card {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-card .btn-primary {
        margin-left: 0;
    }
    
    .share-promo-card {
        flex-direction: column;
        text-align: center;
    }
    
    .share-link-box {
        width: 100%;
        flex-direction: column;
    }
    
    .share-link-box input {
        width: 100%;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .nav-menu {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 18px;
    }
    
    .auth-card {
        padding: 25px;
    }
    
    .message-envelope {
        flex-direction: column;
    }
    
    .envelope-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .inbox-header {
        padding: 15px 20px;
    }
    
    .inbox-header-content h1 {
        font-size: 1.4rem;
    }
    
    .share-promo-card {
        padding: 20px;
    }
    
    .share-link-box {
        min-width: 100%;
    }
}