/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variáveis CSS - Tema Developer */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #1f6feb;
    --success: #238636;
    --success-hover: #2ea043;
    --border: #30363d;
    --border-hover: #484f58;
    --radius: 6px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
}

/* Header */
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    text-align: center;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Main */
main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

#content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

#content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

#content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
    flex: 1;
}

input[type="text"] {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

input[type="text"]::placeholder {
    color: var(--text-secondary);
}

.clear-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 3px;
    transition: all 0.2s ease;
    display: none;
}

.clear-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.input-wrapper.has-content .clear-btn {
    display: block;
}

/* Buttons */
#btn-action {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

#btn-action:hover {
    background: var(--accent-hover);
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    margin: 1.5rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

#video-result h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-secondary);
    margin: 10% auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    overflow: hidden;
}

.modal-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.close:hover {
    background: var(--border);
    color: var(--text-primary);
}

.modal-body {
    padding: 1rem;
}

.modal-body textarea {
    width: 100%;
    height: 120px;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.75rem;
    resize: none;
    margin-bottom: 1rem;
}

#copy-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s ease;
    display: block;
    margin: 0 auto;
}

#copy-btn:hover {
    background: var(--success-hover);
}

#copy-btn.copied {
    background: var(--accent);
}

/* Button Group */
.button-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mode-btn {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.mode-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.875rem;
}

/* Responsivo */
@media (max-width: 768px) {
    main {
        margin: 1rem auto;
    }
    
    #content {
        padding: 1rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
}