/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    animation: pulse 2s infinite;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

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

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.card-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.card-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.card-header h2 i {
    color: #667eea;
}

.card-header p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

/* Form Styles */
.smm-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.form-group label i {
    color: #667eea;
    font-size: 1.2rem;
}

/* Security Input Styles */
.security-input {
    width: 100%;
    padding: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255,255,255,0.9);
    letter-spacing: 2px;
}

.security-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.security-input::placeholder {
    color: #999;
    font-style: italic;
    letter-spacing: normal;
}

.security-note {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
    padding: 10px 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.security-note i {
    color: #667eea;
    font-size: 1rem;
}

/* Textarea Styles */
textarea {
    width: 100%;
    min-height: 140px;
    padding: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255,255,255,0.9);
    line-height: 1.5;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

textarea::placeholder {
    color: #999;
    font-style: italic;
}

/* Upload Area Styles */
.upload-area {
    position: relative;
    border: 3px dashed #ccc;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.6);
    cursor: pointer;
    width: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

#imageUpload {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.upload-content i {
    font-size: 3.5rem;
    color: #667eea;
    margin-bottom: 10px;
}

.upload-content p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.upload-content span {
    color: #666;
    font-size: 1rem;
    margin-top: 5px;
}

/* Image Preview */
.image-preview {
    display: none;
    margin-top: 25px;
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.8);
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.image-preview.show {
    display: block;
}

.preview-image {
    max-width: 100%;
    max-height: 250px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.preview-info {
    font-size: 0.9rem;
    color: #666;
}

.preview-info p {
    margin: 5px 0;
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 50px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    align-self: center;
    min-width: 200px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

.btn-text {
    transition: opacity 0.3s ease;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .loading-spinner {
    opacity: 1;
}

/* Results Section */
.results-section {
    display: none;
    animation: slideUp 0.5s ease;
}

.results-section.show {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.result-item {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #667eea;
    position: relative;
}

.result-item h3 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.result-item h3 i {
    color: #667eea;
}

.result-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    position: relative;
    margin-top: 10px;
}

.result-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding-right: 100px;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    opacity: 0.8;
    font-weight: 500;
}

.copy-btn:hover {
    opacity: 1;
    transform: scale(1.05);
}

.copy-btn.copied {
    background: #28a745;
}

.image-result {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
    border-radius: 15px;
    margin-bottom: 10px;
}

.image-result h3 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
}

.image-result h3 i {
    color: #667eea;
}

.result-image {
    max-width: 100%;
    max-height: 350px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.image-link {
    word-break: break-all;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    display: inline-block;
    margin-top: 10px;
}

.image-link:hover {
    text-decoration: underline;
    background: rgba(102, 126, 234, 0.15);
}

/* Error Section */
.error-section {
    display: none;
    animation: slideUp 0.5s ease;
}

.error-section.show {
    display: block;
}

.error-card {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    text-align: center;
}

.error-content i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.error-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.error-content p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.retry-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: white;
    color: #ff6b6b;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 2.2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .card {
        padding: 25px;
        margin: 0 10px;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 5px;
    }
    
    .upload-area {
        padding: 40px 20px;
        min-height: 180px;
    }
    
    .upload-content i {
        font-size: 3rem;
    }
    
    .submit-btn {
        padding: 18px 40px;
        font-size: 1.1rem;
        width: 100%;
        max-width: 300px;
    }
    
    .result-text {
        padding-right: 20px;
    }
    
    .copy-btn {
        position: static;
        margin-top: 15px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 20px;
        border-radius: 15px;
        margin: 0 5px;
    }
    
    .card-header {
        margin-bottom: 25px;
        padding-bottom: 20px;
    }
    
    .smm-form {
        gap: 25px;
    }
    
    .form-group {
        gap: 10px;
    }
    
    .security-input,
    textarea {
        min-height: 120px;
        padding: 15px;
    }
    
    .upload-area {
        padding: 30px 15px;
        min-height: 160px;
    }
    
    .upload-content i {
        font-size: 2.5rem;
    }
    
    .upload-content p {
        font-size: 1.1rem;
    }
    
    .upload-content span {
        font-size: 0.9rem;
    }
    
    .submit-btn {
        padding: 16px 30px;
        font-size: 1rem;
        width: 100%;
    }
    
    .results-content {
        gap: 20px;
    }
    
    .result-item {
        padding: 20px;
    }
    
    .result-content {
        padding: 15px;
    }
    
    .copy-btn {
        position: static;
        margin-top: 10px;
        width: 100%;
        padding: 12px;
    }
    
    .result-text {
        padding-right: 0;
    }
}