/* Sender Page CSS - Futuristic Design */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #0a0a0f;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

/* Background Animation (Same as landing) */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #ffffff, transparent),
        radial-gradient(2px 2px at 40px 70px, #00ffff, transparent),
        radial-gradient(1px 1px at 90px 40px, #ff00ff, transparent),
        radial-gradient(1px 1px at 130px 80px, #ffff00, transparent),
        radial-gradient(2px 2px at 160px 30px, #ffffff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: twinkle 10s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="%2300ffff" opacity="0.5"><animateTransform attributeName="transform" type="translate" values="0,0; 10,30; 0,60" dur="10s" repeatCount="indefinite"/></circle><circle cx="80" cy="40" r="1" fill="%23ff00ff" opacity="0.7"><animateTransform attributeName="transform" type="translate" values="0,0; -20,20; 0,40" dur="8s" repeatCount="indefinite"/></circle><circle cx="50" cy="80" r="1.5" fill="%2300ff00" opacity="0.6"><animateTransform attributeName="transform" type="translate" values="0,0; 15,-25; 0,-50" dur="12s" repeatCount="indefinite"/></circle></svg>');
    background-size: 400px 400px;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-100vh); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 15, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.nav-logo {
    position: relative;
    font-size: 1.8rem;
    font-weight: 700;
}

.logo-link {
    text-decoration: none;
}

.logo-text {
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    filter: blur(20px);
    opacity: 0.3;
    z-index: -1;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav-link:hover,
.nav-link.active {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    background: rgba(0, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    padding-top: 6rem;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Page Header */
.page-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.header-content {
    z-index: 2;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, #00ffff 0%, #ff00ff 50%, #ffff00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease-in-out infinite alternate;
}

@keyframes gradient-shift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(30deg); }
}

.page-description {
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-bottom: 2rem;
    max-width: 500px;
    line-height: 1.6;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 255, 0, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: 1px solid rgba(0, 255, 0, 0.3);
    font-size: 0.9rem;
    width: fit-content;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Header Visual */
.header-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.message-preview {
    position: relative;
}

.phone-mockup {
    width: 250px;
    height: 500px;
    background: linear-gradient(135deg, #2c2c2c, #1c1c1c);
    border-radius: 25px;
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #075e54;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.whatsapp-header {
    background: #128C7E;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.contact-name {
    font-weight: 600;
    font-size: 1rem;
}

.online-status {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.message-bubble {
    background: #DCF8C6;
    color: #333;
    margin: 1rem;
    padding: 0.75rem;
    border-radius: 15px 15px 5px 15px;
    max-width: 80%;
    margin-left: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: message-appear 0.3s ease-out;
}

@keyframes message-appear {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.message-content {
    word-wrap: break-word;
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    color: #666;
    text-align: right;
    margin-top: 0.25rem;
}

/* Sender Section */
.sender-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.form-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.sender-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #ffffff;
}

.label-text {
    font-size: 1rem;
}

.label-required {
    color: #ff4757;
}

.char-counter {
    margin-left: auto;
    font-size: 0.9rem;
    color: #888;
}

.form-input {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
    color: #888;
}

.phone-input-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.phone-input-container:focus-within {
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.country-prefix {
    background: rgba(0, 255, 255, 0.1);
    padding: 1rem;
    color: #00ffff;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.phone-input {
    border: none;
    background: transparent;
    flex: 1;
}

.message-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

.input-hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Emoji Container */
.emoji-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
}

.emoji-search {
    margin-bottom: 1rem;
}

.emoji-search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    color: #ffffff;
    width: 100%;
    font-size: 0.9rem;
}

.emoji-search-input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.emoji-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}

.emoji-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00ffff;
    transform: scale(1.1);
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.template-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.template-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00ffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
}

/* Send Button */
.form-actions {
    margin-top: 1rem;
}

.send-button {
    position: relative;
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    border: none;
    border-radius: 15px;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 60px;
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 255, 255, 0.4);
}

.send-button:active {
    transform: translateY(0);
}

.send-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
}

.button-icon {
    font-size: 1.3rem;
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.send-button:hover .button-glow {
    left: 100%;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* History Container */
.history-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
}

.history-icon {
    font-size: 1.3rem;
}

.clear-history-btn {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: #ff4757;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.clear-history-btn:hover {
    background: rgba(255, 71, 87, 0.2);
    transform: translateY(-1px);
}

.history-list {
    flex: 1;
    overflow-y: auto;
}

.history-empty {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 255, 255, 0.3);
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #888;
}

.history-number {
    color: #00ffff;
    font-weight: 600;
}

.history-time {
    color: #666;
}

.history-message {
    color: #b0b0b0;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-status {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.status-success {
    color: #00ff00;
}

.status-error {
    color: #ff4757;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    opacity: 0;
    animation: toast-slide-in 0.3s ease forwards;
    max-width: 350px;
    word-wrap: break-word;
}

.toast.success {
    border-color: rgba(0, 255, 0, 0.5);
    background: rgba(0, 255, 0, 0.1);
}

.toast.error {
    border-color: rgba(255, 71, 87, 0.5);
    background: rgba(255, 71, 87, 0.1);
}

.toast.info {
    border-color: rgba(0, 255, 255, 0.5);
    background: rgba(0, 255, 255, 0.1);
}

@keyframes toast-slide-in {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sender-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .page-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .phone-mockup {
        width: 200px;
        height: 400px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.3rem 0.7rem;
        font-size: 0.9rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .emoji-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    
    .toast-container {
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .phone-mockup {
        width: 180px;
        height: 320px;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
