/* SEO Machine Frontend Styles */
.seo-machine-frontend {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sm-frontend-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.sm-frontend-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
}

.sm-frontend-tagline {
    margin: 0;
    font-size: 1.2em;
    opacity: 0.9;
}

/* Cards */
.sm-frontend-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.sm-frontend-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sm-frontend-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.sm-frontend-card-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.sm-frontend-card-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.sm-frontend-card-desc {
    color: #7f8c8d;
    line-height: 1.5;
}

/* Tabs */
.sm-frontend-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1f3f4;
    padding-bottom: 0;
}

.sm-frontend-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    transition: all 0.2s ease;
}

.sm-frontend-tab:hover {
    background: #f8f9fa;
    color: #1a73e8;
}

.sm-frontend-tab.active {
    background: #1a73e8;
    color: white;
}

.sm-frontend-tab-content {
    display: none;
}

.sm-frontend-tab-content.active {
    display: block;
}

/* Panels */
.sm-frontend-panel {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sm-frontend-panel h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.5em;
}

.sm-frontend-panel p {
    color: #7f8c8d;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Forms */
.sm-frontend-form {
    margin-bottom: 25px;
}

.sm-frontend-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.sm-frontend-input-text,
.sm-frontend-input-textarea,
.sm-frontend-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.sm-frontend-input-text:focus,
.sm-frontend-input-textarea:focus,
.sm-frontend-select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.sm-frontend-input-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.sm-frontend-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 15px;
}

.sm-frontend-btn-primary {
    background: #1a73e8;
    color: white;
}

.sm-frontend-btn-primary:hover {
    background: #1557b0;
    transform: translateY(-1px);
}

.sm-frontend-btn-secondary {
    background: #f8f9fa;
    color: #5f6368;
    border: 1px solid #dadce0;
}

.sm-frontend-btn-secondary:hover {
    background: #e8eaed;
}

.sm-frontend-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Result Areas */
.sm-frontend-result-area {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #1a73e8;
    display: none;
}

.sm-frontend-result-area.has-content {
    display: block;
}

.sm-frontend-result-area pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    font-family: inherit;
    line-height: 1.6;
}

/* Loading States */
.sm-frontend-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Notices */
.sm-frontend-notice {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sm-frontend-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.sm-frontend-notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.sm-frontend-notice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Publish Form */
.sm-frontend-publish-form {
    display: grid;
    gap: 20px;
}

.sm-frontend-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.sm-frontend-form-group {
    display: flex;
    flex-direction: column;
}

/* Responsive */
@media (max-width: 768px) {
    .seo-machine-frontend {
        padding: 15px;
    }

    .sm-frontend-cards {
        grid-template-columns: 1fr;
    }

    .sm-frontend-tabs {
        flex-direction: column;
    }

    .sm-frontend-form-row {
        grid-template-columns: 1fr;
    }

    .sm-frontend-header h1 {
        font-size: 2em;
    }
}