* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.message-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 12px;
    padding: 15px;
    color: #fff;
    font-size: 16px;
    resize: none;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.emoji-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    max-height: 150px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.emoji-container::-webkit-scrollbar {
    width: 6px;
}

.emoji-container::-webkit-scrollbar-track {
    background: transparent;
}

.emoji-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.emoji-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emoji-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

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

.secret-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

input[type="checkbox"]:checked {
    background: #4CAF50;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.send-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.send-btn:hover .btn-glow {
    transform: translateX(100%);
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .message-box {
        padding: 15px;
    }
    
    .emoji-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .send-btn {
        padding: 10px 20px;
    }
}

#secretMessageContainer,
#publicMessageContainer {
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

#secretMessageInput,
#publicMessageInput {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    resize: none;
    transition: all 0.3s ease;
}

#secretMessageInput:focus,
#publicMessageInput:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
}

#publicMessageInput {
    background: rgba(33, 150, 243, 0.1);
}

#publicMessageInput:focus {
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.3);
}

.name-container {
    margin-bottom: 20px;
}

.name-input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
}

.name-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.name-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    animation: slideIn 0.5s ease-out;
}

.notification.success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.9), rgba(46, 125, 50, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification.error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.9), rgba(211, 47, 47, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification::before {
    content: '';
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.notification.success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
}

.notification.error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
}

@keyframes slideIn {
    0% {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes slideOut {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
}

.notification.hide {
    animation: slideOut 0.5s ease-in forwards;
}

/* Loading animation for send button */
.send-btn.sending {
    position: relative;
    pointer-events: none;
}

.send-btn.sending::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages Page Styles */
.messages-header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.messages-header h1 {
    margin: 0 0 20px 0;
    font-size: 28px;
    color: #fff;
    text-align: center;
}

.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    color: #fff;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.filter-btn.active {
    background: #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
}

.messages-container {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.message-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.message-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.message-card.secret {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.2);
}

.message-card.pinned {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.2);
}

.message-card.pinned::before {
    content: '📌';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 20px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.message-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.message-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.message-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.control-btn.delete-btn:hover {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.control-btn.pin-btn:hover {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.message-content {
    font-size: 16px;
    line-height: 1.6;
    color: #fff;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.device-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.info-label {
    color: rgba(255, 255, 255, 0.5);
}

.info-value {
    color: #fff;
}

@media (max-width: 768px) {
    .messages-container {
        grid-template-columns: 1fr;
    }
    
    .message-card {
        margin: 0 10px;
    }
}

.login-btn {
    background: #fff;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    margin: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.login-btn:hover {
    background: #f0f0f0;
}

.logout-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}
.logout-icon:hover {
    transform: scale(1.1) rotate(-10deg);
    background: none;
}

/* Login page improvements */
.login-logo {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}
.login-desc {
    color: #bbb;
    font-size: 1.1rem;
    margin-bottom: 25px;
}
.google-btn {
    background: linear-gradient(90deg, #4285F4 0%, #34A853 100%);
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(66,133,244,0.15);
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.google-btn:hover {
    background: linear-gradient(90deg, #357ae8 0%, #2e7d32 100%);
    transform: translateY(-2px) scale(1.04);
}