* {
    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;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    padding: 40px;
}

.input-section {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #555;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-weight: 500;
    margin-top: 15px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
}

.secondary-btn {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.output-section {
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

.output-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.message-box {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    border-left: 5px solid #4facfe;
    position: relative;
}

.message-box p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    margin-right: 50px;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    margin: 0;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.loading {
    text-align: center;
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e1e8ed;
    border-top: 4px solid #4facfe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.error {
    text-align: center;
    padding: 20px;
    background: #ffe6e6;
    border-radius: 10px;
    border-left: 5px solid #ff4757;
    animation: fadeIn 0.3s ease;
}

.error p {
    color: #d63031;
    margin-bottom: 15px;
}

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

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

/* Ad Container Styles */
.ad-container {
    margin: 20px 0;
    text-align: center;
    padding: 15px;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ad-container .adsbygoogle {
    display: block;
    margin: 0 auto;
}

/* Placeholder Ad Styles */
.placeholder-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8f2ff 100%);
    color: #666;
    font-weight: 500;
}

.placeholder-ad p {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.placeholder-ad span {
    font-size: 12px;
    opacity: 0.7;
}

/* Different ad sizes */
.header-ad {
    height: 90px;
    max-width: 728px;
    margin: 0 auto;
}

.content-ad {
    height: 250px;
    width: 300px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    header {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 30px 20px;
    }
    
    textarea {
        padding: 12px;
        font-size: 14px;
    }
    
    button {
        padding: 12px 25px;
        font-size: 14px;
    }

    .ad-container {
        margin: 15px 0;
        padding: 10px;
    }

    .header-ad {
        height: 70px;
        max-width: 320px;
    }

    .content-ad {
        height: 200px;
        width: 250px;
    }
}